[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luajava + popen + windows = fail
- From: Mason Larobina <mason.larobina@...>
- Date: Tue, 29 Mar 2011 18:58:00 +0800
On 29 March 2011 18:25, Simon Bernard <sbernard@sierrawireless.com> wrote:
> Hi,
>
> I have a strange behavior with the popen function when I use it with
> luajava on winXP 32bit.(On linux no problem detected).
>
>
>
> I use the luajava eclipse plugin, and try to execute this code (in a
> plugin Junit Test case) :
>
>
>
> ===============================================
>
> Junit Test case :
>
> @Test
>
> public void popen()
>
> {
>
> l.getGlobal("require");
>
> l.pushString("tests.simpletest");
>
> if (l.pcall( 1, 1, 0) != 0)
>
> l.error();
>
> l.pop(-1);
Have a look at:
http://www.lua.org/manual/5.1/manual.html#lua_pop
lua_pop takes a positive argument of n elements to remove from top of the stack.
> l.getGlobal("popenTest");
>
> if (l.pcall( 0, 0, 0) != 0)
>
> l.error();
>
> }