GameMonkey Script

GameMonkey Script Forums
It is currently Fri May 24, 2019 7:43 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Nov 12, 2004 2:35 pm 

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 708
A problem can occur when calling a C function from C via the script. You would probably not explicitly want to do this, but with generic code, or a script function you later made native, this can occur. The thread following such a call may not terminate correctly. To fix:

in binds\gmCallScript.h after line 304, add this line
s_machine->Sys_SwitchState(s_thread, gmThread::KILLED);

A side note: I plan to depricate the gmCallScript and make a new helper called gmCall. Its interfaces will not take gmUserObject but gmVariable as 'this' and the functions will probably be BeginGlobalFunction(), BeginTableFunction(), BeginFunction(), with overloads allowing you to pass the function name by string, gmStringObject or gmFunctionObject with simplicity/speed tradeoffs as expected. I will also make the class instanciatable so you could make several nested function calls, however a static instance will remain for general use with debug checks for reentry.

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group