mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-08-05 07:31:48 +02:00
Expand the host plug-in API and not just the Squirrel API.
Extend the host plug-in API with a few more date/time functions. Update some of the plugins to use the expanded functions of the host plug-in API.
This commit is contained in:
@@ -316,7 +316,7 @@ Object EntryDataList::GetLong() const
|
||||
// Obtain the initial stack size
|
||||
const StackGuard sg(_SqVM);
|
||||
// Push a long integer instance with the requested value on the stack
|
||||
_SqMod->PushULongObject(_SqVM, longint);
|
||||
SqMod_PushULongObject(_SqVM, longint);
|
||||
// Get the object from the stack and return it
|
||||
return Var< Object >(_SqVM, -1).value;
|
||||
}
|
||||
|
@@ -37,8 +37,10 @@ void OnSquirrelInitialize()
|
||||
}
|
||||
else
|
||||
{
|
||||
// Expand the Squirrel plug-in API into global functions
|
||||
sqmod_api_expand(_SqMod);
|
||||
// Obtain the Squirrel API
|
||||
_SqAPI = _SqMod->GetSquirrelAPI();
|
||||
_SqAPI = SqMod_GetSquirrelAPI();
|
||||
// Expand the Squirrel API into global functions
|
||||
sq_api_expand(_SqAPI);
|
||||
}
|
||||
@@ -55,7 +57,7 @@ void OnSquirrelLoad()
|
||||
return; // Unable to proceed.
|
||||
}
|
||||
// Obtain the Squirrel API and VM
|
||||
_SqVM = _SqMod->GetSquirrelVM();
|
||||
_SqVM = SqMod_GetSquirrelVM();
|
||||
// Make sure that a valid virtual machine exists
|
||||
if (!_SqVM)
|
||||
{
|
||||
|
Reference in New Issue
Block a user