Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Someone-Else
Vim
Commits
1d2beae1
Commit
1d2beae1
authored
14 years ago
by
Bram Moolenaar
Browse files
Options
Downloads
Patches
Plain Diff
Some versions of Ruby redefine rb_str_new2 to rb_str_new_cstr.
Attempt at a fix.
parent
be18d10f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/if_ruby.c
+14
-2
14 additions, 2 deletions
src/if_ruby.c
with
14 additions
and
2 deletions
src/if_ruby.c
+
14
−
2
View file @
1d2beae1
...
...
@@ -170,8 +170,11 @@ static void ruby_vim_init(void);
#define rb_str_cat dll_rb_str_cat
#define rb_str_concat dll_rb_str_concat
#define rb_str_new dll_rb_str_new
/* Ruby may also define rb_str_new2. */
#ifndef rb_str_new2
#ifdef rb_str_new2
/* Ruby may #define rb_str_new2 to use rb_str_new_cstr. */
# define need_rb_str_new_cstr 1
# define rb_str_new_cstr dll_rb_str_new_cstr
#else
# define rb_str_new2 dll_rb_str_new2
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
...
...
@@ -247,7 +250,12 @@ static char *(*dll_rb_str2cstr) (VALUE,int*);
static
VALUE
(
*
dll_rb_str_cat
)
(
VALUE
,
const
char
*
,
long
);
static
VALUE
(
*
dll_rb_str_concat
)
(
VALUE
,
VALUE
);
static
VALUE
(
*
dll_rb_str_new
)
(
const
char
*
,
long
);
#ifdef need_rb_str_new_cstr
/* Ruby may #define rb_str_new2 to use rb_str_new_cstr. */
static
VALUE
(
*
dll_rb_str_new_cstr
)
(
const
char
*
);
#else
static
VALUE
(
*
dll_rb_str_new2
)
(
const
char
*
);
#endif
#ifdef RUBY19_OR_LATER
static
VALUE
(
*
dll_rb_errinfo
)
(
void
);
#else
...
...
@@ -343,7 +351,11 @@ static struct
{
"rb_str_cat"
,
(
RUBY_PROC
*
)
&
dll_rb_str_cat
},
{
"rb_str_concat"
,
(
RUBY_PROC
*
)
&
dll_rb_str_concat
},
{
"rb_str_new"
,
(
RUBY_PROC
*
)
&
dll_rb_str_new
},
#ifdef need_rb_str_new_cstr
{
"rb_str_new_cstr"
,
(
RUBY_PROC
*
)
&
dll_rb_str_new_cstr
},
#else
{
"rb_str_new2"
,
(
RUBY_PROC
*
)
&
dll_rb_str_new2
},
#endif
#ifdef RUBY19_OR_LATER
{
"rb_errinfo"
,
(
RUBY_PROC
*
)
&
dll_rb_errinfo
},
#else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment