summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-25 00:47:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-25 00:47:26 +0000
commit4db0887d67dace8a8c57a44fd1437a320910982b (patch)
tree5f1d04aa959dc50e77dcc3f0ae468777b0f22431 /file.c
parent15381aa203915e79cc1329959882605ee1ec7cc3 (diff)
file.c: proper types
* file.c (rb_file_chown): use proper configured types, not plain int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/file.c b/file.c
index aee3fa6851..872d65b8bf 100644
--- a/file.c
+++ b/file.c
@@ -2292,14 +2292,15 @@ static VALUE
rb_file_chown(VALUE obj, VALUE owner, VALUE group)
{
rb_io_t *fptr;
- int o, g;
+ rb_uid_t o;
+ rb_gid_t g;
#ifndef HAVE_FCHOWN
VALUE path;
#endif
rb_secure(2);
- o = NIL_P(owner) ? -1 : NUM2INT(owner);
- g = NIL_P(group) ? -1 : NUM2INT(group);
+ o = NIL_P(owner) ? (rb_uid_t)-1 : NUM2UIDT(owner);
+ g = NIL_P(group) ? (rb_gid_t)-1 : NUM2GIDT(group);
GetOpenFile(obj, fptr);
#ifndef HAVE_FCHOWN
if (NIL_P(fptr->pathv)) return Qnil;