Skip to content
Browse files

update example ls.pir to recent changes in NCI (no 't' type)

  • Loading branch information...
1 parent 9114095 commit 7a9e7ad4a63861c5feca018217691c1e19d561e3 @NotFound NotFound committed Aug 17, 2011
Showing with 11 additions and 3 deletions.
  1. +11 −3 examples/nci/ls.pir
View
14 examples/nci/ls.pir
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2010, Parrot Foundation.
+# Copyright (C) 2005-2011, Parrot Foundation.
=head1 NAME
@@ -21,11 +21,19 @@ In this encarnation it works on linux i386 and amd64 systems.
.local pmc readdir
.local pmc closedir
libc = loadlib 'libc'
- dlfunc opendir, libc, 'opendir', 'pt'
+ dlfunc opendir, libc, 'opendir', 'pp'
dlfunc readdir, libc, 'readdir', 'pp'
dlfunc closedir, libc, 'closedir', 'ip'
+
+ .const string dirname = "docs"
+ .local pmc dirname_c
+ # Convert the directory name string to a C string.
+ dirname_c = new ["ByteBuffer"]
+ dirname_c = dirname
+ push dirname_c, 0
+
.local pmc curdir
- curdir = opendir("docs")
+ curdir = opendir(dirname_c)
.local pmc entry
.include "datatypes.pasm"

0 comments on commit 7a9e7ad

Please sign in to comment.
Something went wrong with that request. Please try again.