mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-30 20:51:48 +02:00
More code cleanup.
This commit is contained in:
@@ -254,6 +254,49 @@ Uint64 PopStackULong(HSQUIRRELVM vm, SQInteger idx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const SLongInt & GetSLongInt()
|
||||
{
|
||||
static SLongInt l;
|
||||
l.SetNum(0);
|
||||
return l;
|
||||
}
|
||||
|
||||
const SLongInt & GetSLongInt(Int64 n)
|
||||
{
|
||||
static SLongInt l;
|
||||
l.SetNum(n);
|
||||
return l;
|
||||
}
|
||||
|
||||
const SLongInt & GetSLongInt(CSStr s)
|
||||
{
|
||||
static SLongInt l;
|
||||
l = s;
|
||||
return l;
|
||||
}
|
||||
|
||||
const ULongInt & GetULongInt()
|
||||
{
|
||||
static ULongInt l;
|
||||
l.SetNum(0);
|
||||
return l;
|
||||
}
|
||||
|
||||
const ULongInt & GetULongInt(Uint64 n)
|
||||
{
|
||||
static ULongInt l;
|
||||
l.SetNum(n);
|
||||
return l;
|
||||
}
|
||||
|
||||
const ULongInt & GetULongInt(CSStr s)
|
||||
{
|
||||
static ULongInt l;
|
||||
l = s;
|
||||
return l;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
void Register_LongInt(HSQUIRRELVM vm)
|
||||
{
|
||||
|
@@ -1284,4 +1284,14 @@ Int64 PopStackSLong(HSQUIRRELVM vm, SQInteger idx);
|
||||
*/
|
||||
Uint64 PopStackULong(HSQUIRRELVM vm, SQInteger idx);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Get a persistent LongInt instance with the given values.
|
||||
*/
|
||||
const SLongInt & GetSLongInt();
|
||||
const SLongInt & GetSLongInt(Int64 n);
|
||||
const SLongInt & GetSLongInt(CSStr s);
|
||||
const ULongInt & GetULongInt();
|
||||
const ULongInt & GetULongInt(Uint64 n);
|
||||
const ULongInt & GetULongInt(CSStr s);
|
||||
|
||||
} // Namespace:: SqMod
|
||||
|
Reference in New Issue
Block a user