----- Original Message -----
Sent: Tuesday, October 05, 2010 2:18
Subject: Re: Lua BitOp test file causes
"Or have you compiled Lua as C++ code?
I am building it as C++ with my app's build
process. could this be the cause of the problem?
I will build it as C like the wiki says and see if that
makes a difference. i notice there is a disclaimer about exceptions when
building as C++
it shouldnt be that big of a deal for me to completely
replace the lua source with a newer/fresh version if you think that may fix
things. i believe the only thing i changed was for bitop anyways.
On Tue, Oct 5, 2010 at 9:54 AM, Mike Pall <firstname.lastname@example.org>
Joe Andresen wrote:Then something is seriously broken in
your copy of Lua or in
> I tried those two lines and got
the exact same error.
the way you embed it.
That should work just fine. Have you compiled the
> I'm using lua source 5.1.4
> and latest
bit op (source) version 1.0.1
> i am compiling with visual
the provided etc/luavs.bat? Or have you compiled Lua as C++
(not generally recommended)
I'd always suggest to try it with the command line
> I was sure to add the two chunks of code in the
install part of the website
> and recompiled several
Ok, but does it actually catch errors,
> the first couple of asserts work in the test code but
the pcall's do not.
> i use pcall from c in other parts of
code and it works fine.
Since Lua's pcall() library function just calls into
it would be a bit surprising to see a
Perhaps something in your code is replacing the pcall()
E.g. there are broken versions of coxpcall out there.
have you installed an error handler (like debug.traceback)?
Note that the
error handler must not throw an error itself or
abort the process in any
way. It should only return a string.
the error message you quoted is correct. Your problem has
> I'm pretty sure i havent changed the source in that
sense.... the error
> says it is expecting a number not a
string. Could it be that i missed
> something somewhere where the
bitop functions are strings instead of
little to do
with Lua BitOp. You're just seeing a symptom in the
test cases. Error
handling is part of the Lua core.