Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
add ../languages/lua/library/?.pbc as first path.
Browse files Browse the repository at this point in the history
This allows to :
 - load languages/lua/library/uuid.pbc which loads library/uuid.pbc
  • Loading branch information
fperrad committed Sep 21, 2009
1 parent 16f2b05 commit 0fd29ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/luapackage.pir
Expand Up @@ -65,7 +65,7 @@ LIST
_loaders[$P2] = loader_PBCroot

setpath(_package, 'path', 'LUA_PATH', './?.lua')
setpath(_package, 'pbcpath', 'LUA_PBCPATH', 'library/?.pbc;./?.pbc;./?.pir')
setpath(_package, 'pbcpath', 'LUA_PBCPATH', '../languages/lua/library/?.pbc;library/?.pbc;./?.pbc;./?.pir')

.local pmc _lua__REGISTRY
_lua__REGISTRY = get_hll_global '_REGISTRY'
Expand Down
4 changes: 2 additions & 2 deletions t/package.t
Expand Up @@ -284,7 +284,7 @@ print(type(package.pbcpath))
print(package.pbcpath)
CODE
string
library/?.pbc;./?.pbc;./?.pir
../languages/lua/library/?.pbc;library/?.pbc;./?.pbc;./?.pir
OUTPUT

$ENV{LUA_PBCPATH} = "?.pbc";
Expand All @@ -298,7 +298,7 @@ $ENV{LUA_PBCPATH} = ";;languages/lua/?.pbc";
language_output_is( 'lua', << 'CODE', << 'OUTPUT', 'table package.pbcpath' );
print(package.pbcpath)
CODE
;library/?.pbc;./?.pbc;./?.pir;languages/lua/?.pbc
;../languages/lua/library/?.pbc;library/?.pbc;./?.pbc;./?.pir;languages/lua/?.pbc
OUTPUT

delete $ENV{LUA_PBCPATH};
Expand Down

0 comments on commit 0fd29ff

Please sign in to comment.