-Fix crashes with thread_exit()

-Added draft of C script API (still disabled and unused)
This commit is contained in:
Juan Linietsky 2016-06-26 10:53:34 -03:00
parent 544b196d77
commit 3813160ea0
5 changed files with 586 additions and 1 deletions

View file

@ -85,6 +85,20 @@ void ScriptServer::register_language(ScriptLanguage *p_language) {
_languages[_language_count++]=p_language;
}
void ScriptServer::unregister_language(ScriptLanguage *p_language) {
for(int i=0;i<_language_count;i++) {
if (_languages[i]==p_language) {
_language_count--;
if (i<_language_count) {
SWAP(_languages[i],_languages[_language_count]);
}
return;
}
}
}
void ScriptServer::init_languages() {
for(int i=0;i<_language_count;i++) {