1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2026-01-20 22:24:38 +01:00

Always name native functions to help debugging with a more clear traceback.

This commit is contained in:
Sandu Liviu Catalin
2019-05-17 21:35:17 +03:00
parent b1c8ab0f7b
commit 7ad3790f8c
4 changed files with 54 additions and 10 deletions

View File

@@ -178,6 +178,8 @@ public:
sq_pushobject(vm, GetObject());
sq_pushstring(vm, name, -1);
sq_newclosure(vm, func, 0);
// Set the closure name (for debug purposes)
sq_setnativeclosurename(vm, -1, name);
sq_newslot(vm, -3, false);
sq_pop(vm,1); // pop table
return *this;