lua-users home
lua-l archive

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


If what you mean is:

  local a = 3
  cfunction(a)
  -- now a has magically become 5

Then you can't do it, in Lua or any sensible language ;)
(Well, we all have our biases.)
In Lua, all arguments are passed by value.

Do this:

a = cfunction()



On 30-Aug-04, at 5:32 PM, Aaron Newell wrote:

Ok, I have a problem.

I am calling functions in an external library that
i've written in C. I initalise this library using the
"loadlib" function in lua.

I call these C functions fine, and pass data to them
fine.

However what i want is to send data to the C functions
via params to the C functions (i can do this already),
then the C functions to manipulate that data so that
the original data passed from the lua script is
changed.

I am really out of ideas.

Thanks, I hope you can help,
Aaron


	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com