mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 07:07:13 +02:00
Update the module API and merge shared code between modules and host plugin.
This commit is contained in:
@ -233,11 +233,11 @@ void Register_ChronoDate(HSQUIRRELVM vm, Table & /*cns*/)
|
||||
.Ctor< Uint16, Uint8, Uint8 >()
|
||||
// Static Properties
|
||||
.SetStaticValue(_SC("GlobalDelimiter"), &Date::Delimiter)
|
||||
// Core Metamethods
|
||||
// Core Meta-methods
|
||||
.Func(_SC("_tostring"), &Date::ToString)
|
||||
.SquirrelFunc(_SC("_typename"), &Date::Typename)
|
||||
.Func(_SC("_cmp"), &Date::Cmp)
|
||||
// Metamethods
|
||||
// Meta-methods
|
||||
.Func< Date (Date::*)(const Date &) const >(_SC("_add"), &Date::operator +)
|
||||
.Func< Date (Date::*)(const Date &) const >(_SC("_sub"), &Date::operator -)
|
||||
.Func< Date (Date::*)(const Date &) const >(_SC("_mul"), &Date::operator *)
|
||||
|
@ -342,11 +342,11 @@ void Register_ChronoTime(HSQUIRRELVM vm, Table & /*cns*/)
|
||||
.Ctor< Uint8, Uint8, Uint8, Uint16 >()
|
||||
// Static Properties
|
||||
.SetStaticValue(_SC("GlobalDelimiter"), &Time::Delimiter)
|
||||
// Core Metamethods
|
||||
// Core Meta-methods
|
||||
.Func(_SC("_tostring"), &Time::ToString)
|
||||
.SquirrelFunc(_SC("_typename"), &Time::Typename)
|
||||
.Func(_SC("_cmp"), &Time::Cmp)
|
||||
// Metamethods
|
||||
// Meta-methods
|
||||
.Func< Time (Time::*)(const Time &) const >(_SC("_add"), &Time::operator +)
|
||||
.Func< Time (Time::*)(const Time &) const >(_SC("_sub"), &Time::operator -)
|
||||
.Func< Time (Time::*)(const Time &) const >(_SC("_mul"), &Time::operator *)
|
||||
|
@ -72,7 +72,7 @@ void Register_ChronoTimer(HSQUIRRELVM vm, Table & /*cns*/)
|
||||
// Constructors
|
||||
.Ctor()
|
||||
.Ctor< const Timer & >()
|
||||
// Core Metamethods
|
||||
// Core Meta-methods
|
||||
.Func(_SC("_tostring"), &Timer::ToString)
|
||||
.Func(_SC("_cmp"), &Timer::Cmp)
|
||||
// Properties
|
||||
|
@ -123,10 +123,10 @@ void Register_ChronoTimestamp(HSQUIRRELVM vm, Table & /*cns*/)
|
||||
// Constructors
|
||||
.Ctor()
|
||||
.Ctor< const Timestamp & >()
|
||||
// Core Metamethods
|
||||
// Core Meta-methods
|
||||
.Func(_SC("_tostring"), &Timestamp::ToString)
|
||||
.Func(_SC("_cmp"), &Timestamp::Cmp)
|
||||
// Metamethods
|
||||
// Meta-methods
|
||||
.Func< Timestamp (Timestamp::*)(const Timestamp &) const >(_SC("_add"), &Timestamp::operator +)
|
||||
.Func< Timestamp (Timestamp::*)(const Timestamp &) const >(_SC("_sub"), &Timestamp::operator -)
|
||||
.Func< Timestamp (Timestamp::*)(const Timestamp &) const >(_SC("_mul"), &Timestamp::operator *)
|
||||
|
@ -1,7 +1,6 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/Crypt.hpp"
|
||||
#include "Base/Shared.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <cstdlib>
|
||||
|
@ -1,7 +1,6 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/Crypt/AES.hpp"
|
||||
#include "Base/Shared.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <cstdlib>
|
||||
@ -143,7 +142,7 @@ void Register_AES(HSQUIRRELVM vm)
|
||||
// Constructors
|
||||
.Ctor()
|
||||
.Ctor< CSStr >()
|
||||
// Metamethods
|
||||
// Meta-methods
|
||||
.Func(_SC("_cmp"), &AES256::Cmp)
|
||||
.SquirrelFunc(_SC("_typename"), &AES256::Typename)
|
||||
.Func(_SC("_tostring"), &AES256::ToString)
|
||||
|
@ -1,7 +1,6 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/Crypt/Hash.hpp"
|
||||
#include "Base/Shared.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <crc32.h>
|
||||
@ -56,7 +55,7 @@ template < class T > static void RegisterWrapper(Table & hashns, CCStr cname)
|
||||
hashns.Bind(cname, Class< Hash >(hashns.GetVM(), cname)
|
||||
// Constructors
|
||||
.Ctor()
|
||||
// Metamethods
|
||||
// Meta-methods
|
||||
.Func(_SC("_tostring"), &Hash::ToString)
|
||||
// Properties
|
||||
.Prop(_SC("Hash"), &Hash::GetHash)
|
||||
|
@ -1,6 +1,5 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/IO/INI.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <cerrno>
|
||||
@ -388,7 +387,7 @@ void Register_INI(HSQUIRRELVM vm)
|
||||
.Ctor()
|
||||
.Ctor< CSStr, SQInteger >()
|
||||
.Ctor< const IniResult & >()
|
||||
// Core Metamethods
|
||||
// Core Meta-methods
|
||||
.Func(_SC("_cmp"), &IniResult::Cmp)
|
||||
.SquirrelFunc(_SC("_typename"), &IniResult::Typename)
|
||||
.Func(_SC("_tostring"), &IniResult::ToString)
|
||||
@ -404,7 +403,7 @@ void Register_INI(HSQUIRRELVM vm)
|
||||
// Constructors
|
||||
.Ctor()
|
||||
.Ctor< const Entries & >()
|
||||
// Core Metamethods
|
||||
// Core Meta-methods
|
||||
.Func(_SC("_cmp"), &Entries::Cmp)
|
||||
.SquirrelFunc(_SC("_typename"), &Entries::Typename)
|
||||
.Func(_SC("_tostring"), &Entries::ToString)
|
||||
@ -433,7 +432,7 @@ void Register_INI(HSQUIRRELVM vm)
|
||||
.Ctor< bool >()
|
||||
.Ctor< bool, bool >()
|
||||
.Ctor< bool, bool, bool >()
|
||||
// Core Metamethods
|
||||
// Core Meta-methods
|
||||
.Func(_SC("_cmp"), &Document::Cmp)
|
||||
.SquirrelFunc(_SC("_typename"), &Document::Typename)
|
||||
.Func(_SC("_tostring"), &Document::ToString)
|
||||
|
@ -1,7 +1,6 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/Math.hpp"
|
||||
#include "Library/Numeric.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <cmath>
|
||||
@ -1075,7 +1074,7 @@ static SQInteger SqDigits1(HSQUIRRELVM vm)
|
||||
return sq_throwerror(vm, "Wrong number of arguments");
|
||||
}
|
||||
// Fetch the integer value from the stack
|
||||
Int64 n = std::llabs(PopStackLong(vm, 2));
|
||||
Int64 n = std::llabs(PopStackSLong(vm, 2));
|
||||
// Start with 0 digits
|
||||
Uint8 d = 0;
|
||||
// Identify the number of digits
|
||||
@ -1099,7 +1098,7 @@ static SQInteger SqDigits0(HSQUIRRELVM vm)
|
||||
return sq_throwerror(vm, "Wrong number of arguments");
|
||||
}
|
||||
// Fetch the integer value from the stack
|
||||
Int64 n = std::llabs(PopStackLong(vm, 2));
|
||||
Int64 n = std::llabs(PopStackSLong(vm, 2));
|
||||
// Start with 0 digits
|
||||
Uint8 d = 0;
|
||||
// Identify the number of digits
|
||||
|
@ -91,7 +91,7 @@ void Register_Numeric(HSQUIRRELVM vm)
|
||||
/* Properties */
|
||||
.Prop(_SC("Str"), &SLongInt::GetCStr, &SLongInt::SetStr)
|
||||
.Prop(_SC("Num"), &SLongInt::GetSNum, &SLongInt::SetNum)
|
||||
/* Core Metamethods */
|
||||
/* Core Meta-methods */
|
||||
.Func(_SC("_tostring"), &SLongInt::ToString)
|
||||
.Func(_SC("_typename"), &SLongInt::Typename)
|
||||
.Func(_SC("_cmp"), &SLongInt::Cmp)
|
||||
@ -101,7 +101,7 @@ void Register_Numeric(HSQUIRRELVM vm)
|
||||
.Func(_SC("tostring"), &SLongInt::ToSqString)
|
||||
.Func(_SC("tobool"), &SLongInt::ToSqBool)
|
||||
.Func(_SC("tochar"), &SLongInt::ToSqChar)
|
||||
/* Metamethods */
|
||||
/* Meta-methods */
|
||||
.Func< SLongInt (SLongInt::*)(const SLongInt &) const >(_SC("_add"), &SLongInt::operator +)
|
||||
.Func< SLongInt (SLongInt::*)(const SLongInt &) const >(_SC("_sub"), &SLongInt::operator -)
|
||||
.Func< SLongInt (SLongInt::*)(const SLongInt &) const >(_SC("_mul"), &SLongInt::operator *)
|
||||
@ -127,7 +127,7 @@ void Register_Numeric(HSQUIRRELVM vm)
|
||||
/* Properties */
|
||||
.Prop(_SC("Str"), &ULongInt::GetCStr, &ULongInt::SetStr)
|
||||
.Prop(_SC("Num"), &ULongInt::GetSNum, &ULongInt::SetNum)
|
||||
/* Core Metamethods */
|
||||
/* Core Meta-methods */
|
||||
.Func(_SC("_tostring"), &ULongInt::ToString)
|
||||
.Func(_SC("_typename"), &ULongInt::Typename)
|
||||
.Func(_SC("_cmp"), &ULongInt::Cmp)
|
||||
@ -137,7 +137,7 @@ void Register_Numeric(HSQUIRRELVM vm)
|
||||
.Func(_SC("tostring"), &ULongInt::ToSqString)
|
||||
.Func(_SC("tobool"), &ULongInt::ToSqBool)
|
||||
.Func(_SC("tochar"), &ULongInt::ToSqChar)
|
||||
/* Metamethods */
|
||||
/* Meta-methods */
|
||||
.Func< ULongInt (ULongInt::*)(const ULongInt &) const >(_SC("_add"), &ULongInt::operator +)
|
||||
.Func< ULongInt (ULongInt::*)(const ULongInt &) const >(_SC("_sub"), &ULongInt::operator -)
|
||||
.Func< ULongInt (ULongInt::*)(const ULongInt &) const >(_SC("_mul"), &ULongInt::operator *)
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include "Library/String.hpp"
|
||||
#include "Base/Shared.hpp"
|
||||
#include "Base/Buffer.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <cctype>
|
||||
|
@ -1,7 +1,6 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/System.hpp"
|
||||
#include "Base/Shared.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
#include "Base/Buffer.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -1,6 +1,5 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/System/Environment.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <cctype>
|
||||
|
@ -1,7 +1,6 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/System/Path.hpp"
|
||||
#include "Library/System/Environment.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <cctype>
|
||||
@ -1675,7 +1674,7 @@ void Register_SysPath(HSQUIRRELVM vm)
|
||||
.Ctor()
|
||||
.Ctor< CSStr >()
|
||||
.Ctor< CSStr, Int32 >()
|
||||
// Metamethods
|
||||
// Meta-methods
|
||||
.Func(_SC("_cmp"), &SysPath::Cmp)
|
||||
.SquirrelFunc(_SC("_typename"), &SysPath::Typename)
|
||||
.Func(_SC("_tostring"), &SysPath::ToString)
|
||||
|
@ -1,7 +1,6 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/Utils/BufferWrapper.hpp"
|
||||
#include "Library/Utils/BufferInterpreter.hpp"
|
||||
#include "Base/Stack.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <cstring>
|
||||
|
Reference in New Issue
Block a user