mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
* pack.c (pack_pack): use NUM2INT() instead of num2i32().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
66d0389895
commit
df84c64be9
10 changed files with 63 additions and 52 deletions
8
dir.c
8
dir.c
|
@ -379,7 +379,7 @@ dir_initialize(dir, dirname)
|
|||
{
|
||||
struct dir_data *dp;
|
||||
|
||||
dirname = rb_get_path(dirname);
|
||||
FilePathValue(dirname);
|
||||
Data_Get_Struct(dir, struct dir_data, dp);
|
||||
if (dp->dir) closedir(dp->dir);
|
||||
if (dp->path) free(dp->path);
|
||||
|
@ -744,7 +744,7 @@ dir_s_chdir(argc, argv, obj)
|
|||
|
||||
rb_secure(2);
|
||||
if (rb_scan_args(argc, argv, "01", &path) == 1) {
|
||||
path = rb_get_path(path);
|
||||
FilePathValue(path);
|
||||
dist = RSTRING(path)->ptr;
|
||||
}
|
||||
else {
|
||||
|
@ -807,7 +807,7 @@ check_dirname(dir)
|
|||
char *path, *pend;
|
||||
|
||||
rb_secure(2);
|
||||
*dir = rb_get_path(*dir);
|
||||
FilePathValue(*dir);
|
||||
path = RSTRING(*dir)->ptr;
|
||||
if (path && *(pend = rb_path_end(rb_path_skip_prefix(path)))) {
|
||||
*dir = rb_str_new(path, pend - path);
|
||||
|
@ -1439,7 +1439,7 @@ rb_push_glob(str, flags)
|
|||
else
|
||||
ary = rb_ary_new();
|
||||
|
||||
str = rb_get_path(str);
|
||||
FilePathValue(str);
|
||||
buf = xmalloc(RSTRING(str)->len + 1);
|
||||
|
||||
p = RSTRING(str)->ptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue