which "L" should i use to make call to lua when in a C-function called in a coroutine?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

which "L" should i use to make call to lua when in a C-function called in a coroutine?

fatfatson
hi,all:
  now i'm confusing about the problem:
  in script, i create and run a coroutine, and then call into a C-function,  and in it i want to call back to lua, then which "L" should i use for this callback ? is it the current coroutine's L, or the "Main Coroutine" 's L? or even a completely new clean L which is dedicated for work of this type ?
  until now, i'm using the second way -- "Main Coroutine" 's L, and encounters nearly no error, but i am worried about if it won't work someday after my code runs too large...
  could u everyone give me some Guidelines?sthanks...
Reply | Threaded
Open this post in threaded view
|

Re: which "L" should i use to make call to lua when in a C-function called in a coroutine?

Sam Roberts
2009/11/23 冶晶邓 <[hidden email]>:
> hi,all:
>   now i'm confusing about the problem:
>   in script, i create and run a coroutine, and then call into a C-function,
> and in it i want to call back to lua, then which "L" should i use for this
> callback ?

Use the L that was passed into your C-function.

Sam