lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Rici Lake wrote:
I think you mean "syntactically identical" :) If so, I sympathize but I think you are going to end up fighting a semantic impedance mismatch.

Sorry, long day :)

As far as integers and strings go, I honestly think you'd be better off
> converting them between C and Lua at the call-boundary rather than
trying to proxy them.

The issue here is that this particular system does not magic away pointer types, etc. but instead has it's own type of proxy object. As such, out parameters aren't returned as multiple parameters, but inherently work because they're accessed through proxies. As such, after the following piece of pseudoLua:

myInt = declareCVariable(int)
myInt = 4
setValueOfIntPointer(myInt:pointer(), 5)

myInt will equal 5. (Yes, I know the overloading of = as declaritive assignment and mutation is utterly horrible)

Sorry I can't reply any further, but it's home time now.

It's worth noting that this system actually works (I fixed the stack corruption this morning), it's just a bit slow due to the per cycle local detection issue.

--
Lisa
http://www.thecommune.org.uk/~lisa/