Advertisement
Guest User

Untitled

a guest
Jul 11th, 2021
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. /tmp% raku -e 'use NativeCall; sub chdire(Str) is native is symbol("chdir") { * }; say "Raku-cwd: ", $*CWD; chdir(".."); say "Raku-cwd-afrer-chdir: ",$*CWD; sub getcwd(blob8, int32) is native { * }; my $blob = blob8.allocate(256,0); getcwd($blob, 255); say "C-cwd-after-chdir: ", $blob.decode()'
  2.  
  3. Raku-cwd: "/private/tmp".IO
  4. Raku-cwd-afrer-chdir: "/private".IO
  5. C-cwd-after-chdir: /private/tmp
  6.  
  7. /tmp% raku -e 'use NativeCall; sub C-chdir(Str) is native is symbol("chdir") { * }; say "Raku-cwd: ", $*CWD; C-chdir(".."); say "Raku-cwd-afrer-C-chdir: ",$*CWD; sub getcwd(blob8, int32) is native { * }; my $blob = blob8.allocate(256,0); getcwd($blob, 255); say "C-cwd-after-C-chdir: ", $blob.decode()'
  8.  
  9. Raku-cwd: "/private/tmp".IO
  10. Raku-cwd-afrer-C-chdir: "/private/tmp".IO
  11. C-cwd-after-C-chdir: /private
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement