Skip to content

Commit

Permalink
nqp::chown args should be unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterDuke17 committed Nov 11, 2022
1 parent 18f5307 commit 37b976d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/ops.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/vm/js/Operations.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/vm/jvm/QAST/Compiler.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 37b976d

Please sign in to comment.