1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-16 07:07:13 +02:00

Code cleanup.

Get rid of ReleaseGently.
This commit is contained in:
Sandu Liviu Catalin
2020-04-27 13:10:54 +03:00
parent 48005a98f0
commit 22a17fe3c4
28 changed files with 212 additions and 223 deletions

View File

@ -647,11 +647,11 @@ String SqTypeName(HSQUIRRELVM vm, SQInteger idx)
Object BufferToStrObj(const Buffer & b)
{
// Obtain the initial stack size
const StackGuard sg(DefaultVM::Get());
const StackGuard sg(SqVM());
// Push the string onto the stack
sq_pushstring(DefaultVM::Get(), b.Data(), b.Position());
sq_pushstring(SqVM(), b.Data(), b.Position());
// Obtain the object from the stack and return it
return Var< Object >(DefaultVM::Get(), -1).value;
return Var< Object >(SqVM(), -1).value;
}
// --------------------------------------------------------------------------------------------
@ -663,11 +663,11 @@ Object BufferToStrObj(const Buffer & b, Uint32 size)
STHROWF("The specified buffer size is out of range: %u >= %u", size, b.Capacity());
}
// Obtain the initial stack size
const StackGuard sg(DefaultVM::Get());
const StackGuard sg(SqVM());
// Push the string onto the stack
sq_pushstring(DefaultVM::Get(), b.Data(), size);
sq_pushstring(SqVM(), b.Data(), size);
// Obtain the object from the stack and return it
return Var< Object >(DefaultVM::Get(), -1).value;
return Var< Object >(SqVM(), -1).value;
}
// ------------------------------------------------------------------------------------------------