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

Commit

Permalink
fix function require
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Oct 28, 2009
1 parent e0819c5 commit 8e0fa68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/lib/luapackage.pir
Expand Up @@ -472,12 +472,16 @@ any loader for the module, then C<require> signals an error.
new $P0, 'LuaNil'
$P0 = $P1(modname) # run loaded module
$I0 = isa $P0, 'LuaNil'
unless $I0 goto L7
if $I0 goto L7
_LOADED[modname] = $P0
L7:
$P0 = _LOADED[modname]
unless $P0 == sentinel goto L8
# use true as result
new $P0, 'LuaBoolean'
set $P0, 1
L7:
_LOADED[modname] = $P0
L8:
.return ($P0)
.end

Expand Down
2 changes: 1 addition & 1 deletion t/lua-TestMore
Submodule lua-TestMore updated from b73dcd to bba343

0 comments on commit 8e0fa68

Please sign in to comment.