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

Commit

Permalink
Browse files Browse the repository at this point in the history
(.annotate file)
  • Loading branch information
fperrad committed Jun 19, 2011
1 parent 7edb8bf commit 2792a9d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/lib/luabasic.pir
@@ -1,4 +1,4 @@
# Copyright (C) 2005-2009, Parrot Foundation. # Copyright (C) 2005-2011, Parrot Foundation.
# $Id$ # $Id$


=head1 Lua Basic Library =head1 Lua Basic Library
Expand Down Expand Up @@ -434,12 +434,17 @@ To load and run a given string, use the idiom
=cut =cut
.include 'cclass.pasm'
.sub 'loadstring' .sub 'loadstring'
.param pmc s :optional .param pmc s :optional
.param pmc chunkname :optional .param pmc chunkname :optional
.param pmc extra :slurpy .param pmc extra :slurpy
$S1 = lua_checkstring(1, s) $S1 = lua_checkstring(1, s)
$S2 = lua_optstring(2, chunkname, $S1) $S2 = lua_optstring(2, chunkname, $S1)
$I0 = length $S2
$I0 = find_cclass .CCLASS_NEWLINE, $S2, 0, $I0
$S2 = substr $S2, 0, $I0
($P0, $S0) = lua_loadbuffer($S1, $S2) ($P0, $S0) = lua_loadbuffer($S1, $S2)
.tailcall load_aux($P0, $S0) .tailcall load_aux($P0, $S0)
.end .end
Expand Down

0 comments on commit 2792a9d

Please sign in to comment.