1
0
Fork 0

DBG: added Misc::Alloc and Misc::Free to the script api

This commit is contained in:
Mr. eXoDia 2015-07-07 17:32:04 +02:00
parent 3e2a487c05
commit e9141963a0
2 changed files with 12 additions and 0 deletions

View File

@ -20,4 +20,14 @@ SCRIPT_EXPORT duint Script::Misc::ResolveLabel(const char* label)
if(!ParseExpression(label, &value))
return 0;
return value;
}
SCRIPT_EXPORT void* Script::Misc::Alloc(duint size)
{
return emalloc(size, "Script::Misc::Alloc");
}
SCRIPT_EXPORT void Script::Misc::Free(void* ptr)
{
return efree(ptr, "Script::Misc::Free");
}

View File

@ -10,6 +10,8 @@ namespace Misc
SCRIPT_EXPORT bool ParseExpression(const char* expression, duint* value);
SCRIPT_EXPORT duint RemoteGetProcAddress(const char* module, const char* api);
SCRIPT_EXPORT duint ResolveLabel(const char* label);
SCRIPT_EXPORT void* Alloc(duint size);
SCRIPT_EXPORT void Free(void* ptr);
}; //Misc
}; //Script