diff --git a/examples/nci/ls.pir b/examples/nci/ls.pir index 182e5be..10ca98b 100644 --- a/examples/nci/ls.pir +++ b/examples/nci/ls.pir @@ -20,8 +20,12 @@ In this encarnation it works on linux i386 and amd64 systems. .local pmc opendir .local pmc readdir .local pmc closedir + + load_bytecode 'NCI/Utils.pbc' + $P1 = get_root_global ['parrot';'NCI';'Utils'], 'dlfancy' + libc = loadlib 'libc' - dlfunc opendir, libc, 'opendir', 'pt' + opendir = $P1(libc, 'opendir', 'pt') dlfunc readdir, libc, 'readdir', 'pp' dlfunc closedir, libc, 'closedir', 'ip' .local pmc curdir