* 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:
matz 2004-04-07 06:30:15 +00:00
parent 66d0389895
commit df84c64be9
10 changed files with 63 additions and 52 deletions

8
dir.c
View file

@ -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;