diff --git a/docs/ops.markdown b/docs/ops.markdown index dbe780b90..75cfbaf72 100644 --- a/docs/ops.markdown +++ b/docs/ops.markdown @@ -1521,7 +1521,7 @@ Change the permissions of `$path` to the posix style permissions of `$mode`. Returns 0 on success, throws an exception on failure. ## chown -* `chown(str $path, int $uid, int $gid --> int)` +* `chown(str $path, uint $uid, uint $gid --> int)` Change the owner or group of the path. Throws an exception on failure. diff --git a/src/vm/js/Operations.nqp b/src/vm/js/Operations.nqp index 668c56403..682ed1c1a 100644 --- a/src/vm/js/Operations.nqp +++ b/src/vm/js/Operations.nqp @@ -576,7 +576,7 @@ class QAST::OperationsJS { add_simple_op('mkdir', $T_VOID, [$T_STR, $T_INT], :side_effects); add_simple_op('chmod', $T_VOID, [$T_STR, $T_INT], :side_effects); - add_simple_op('chown', $T_VOID, [$T_STR, $T_INT, $T_INT], :side_effects); + add_simple_op('chown', $T_VOID, [$T_STR, $T_UINT, $T_UINT], :side_effects); add_simple_op('getenvhash', $T_OBJ, [], :side_effects); add_simple_op('getsignals', $T_OBJ, [], :side_effects, :takes_hll); diff --git a/src/vm/jvm/QAST/Compiler.nqp b/src/vm/jvm/QAST/Compiler.nqp index cff6a6fdc..37d33d551 100644 --- a/src/vm/jvm/QAST/Compiler.nqp +++ b/src/vm/jvm/QAST/Compiler.nqp @@ -2270,7 +2270,7 @@ QAST::OperationsJAST.map_classlib_core_op('filenofh', $TYPE_OPS, 'filenofh', [$R QAST::OperationsJAST.map_classlib_core_op('setbuffersizefh', $TYPE_OPS, 'setbuffersizefh', [$RT_OBJ, $RT_INT], $RT_OBJ, :tc); QAST::OperationsJAST.map_classlib_core_op('chmod', $TYPE_OPS, 'chmod', [$RT_STR, $RT_INT], $RT_INT, :tc); -QAST::OperationsJAST.map_classlib_core_op('chown', $TYPE_OPS, 'chown', [$RT_STR, $RT_INT, $RT_INT], $RT_INT, :tc); +QAST::OperationsJAST.map_classlib_core_op('chown', $TYPE_OPS, 'chown', [$RT_STR, $RT_UINT, $RT_UINT], $RT_INT, :tc); QAST::OperationsJAST.map_classlib_core_op('unlink', $TYPE_OPS, 'unlink', [$RT_STR], $RT_INT, :tc); QAST::OperationsJAST.map_classlib_core_op('rmdir', $TYPE_OPS, 'rmdir', [$RT_STR], $RT_INT, :tc); QAST::OperationsJAST.map_classlib_core_op('cwd', $TYPE_OPS, 'cwd', [], $RT_STR);