Merge push_include and ruby_push_include

This commit is contained in:
Nobuyoshi Nakada 2023-08-08 11:29:50 +09:00
parent 0d93fd0f69
commit b88e0d6653
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

11
ruby.c
View File

@ -439,7 +439,7 @@ usage(const char *name, int help, int highlight, int columns)
#define rubylib_path_new rb_str_new
static void
push_include(const char *path, VALUE (*filter)(VALUE))
ruby_push_include(const char *path, VALUE (*filter)(VALUE))
{
const char sep = PATH_SEP_CHAR;
const char *p, *s;
@ -452,6 +452,7 @@ push_include(const char *path, VALUE (*filter)(VALUE))
# define is_path_sep(c) ((c) == sep)
#endif
if (path == 0) return;
p = path;
while (*p) {
long len;
@ -489,14 +490,6 @@ push_include(const char *path, VALUE (*filter)(VALUE))
}
}
static void
ruby_push_include(const char *path, VALUE (*filter)(VALUE))
{
if (path == 0)
return;
push_include(path, filter);
}
static VALUE
identical_path(VALUE path)
{