DBG: added Misc::Alloc and Misc::Free to the script api
This commit is contained in:
parent
3e2a487c05
commit
e9141963a0
|
|
@ -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");
|
||||
}
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue