mirror of
				https://github.com/VCMP-SqMod/SqMod.git
				synced 2025-11-04 00:07:19 +01:00 
			
		
		
		
	Export newly added Squirrel functions. Fix function definition with different name than declaration.
This commit is contained in:
		@@ -21,6 +21,7 @@
 | 
			
		||||
				</Compiler>
 | 
			
		||||
				<Linker>
 | 
			
		||||
					<Add option="-m32" />
 | 
			
		||||
					<Add library="Ws2_32" />
 | 
			
		||||
					<Add directory="../lib/mingw32-d" />
 | 
			
		||||
				</Linker>
 | 
			
		||||
				<ExtraCommands>
 | 
			
		||||
@@ -43,6 +44,7 @@
 | 
			
		||||
				<Linker>
 | 
			
		||||
					<Add option="-s" />
 | 
			
		||||
					<Add option="-m32" />
 | 
			
		||||
					<Add library="Ws2_32" />
 | 
			
		||||
					<Add directory="../lib/mingw32" />
 | 
			
		||||
				</Linker>
 | 
			
		||||
				<ExtraCommands>
 | 
			
		||||
@@ -65,6 +67,7 @@
 | 
			
		||||
				</Compiler>
 | 
			
		||||
				<Linker>
 | 
			
		||||
					<Add option="-m64" />
 | 
			
		||||
					<Add library="Ws2_32" />
 | 
			
		||||
					<Add directory="../lib/mingw64-d" />
 | 
			
		||||
				</Linker>
 | 
			
		||||
				<ExtraCommands>
 | 
			
		||||
@@ -88,6 +91,7 @@
 | 
			
		||||
				<Linker>
 | 
			
		||||
					<Add option="-s" />
 | 
			
		||||
					<Add option="-m64" />
 | 
			
		||||
					<Add library="Ws2_32" />
 | 
			
		||||
					<Add directory="../lib/mingw64" />
 | 
			
		||||
				</Linker>
 | 
			
		||||
				<ExtraCommands>
 | 
			
		||||
@@ -205,6 +209,7 @@
 | 
			
		||||
				<Linker>
 | 
			
		||||
					<Add option="-m32" />
 | 
			
		||||
					<Add option="-static" />
 | 
			
		||||
					<Add library="Ws2_32" />
 | 
			
		||||
					<Add directory="../lib/mingw32-d" />
 | 
			
		||||
				</Linker>
 | 
			
		||||
				<ExtraCommands>
 | 
			
		||||
@@ -231,6 +236,7 @@
 | 
			
		||||
					<Add option="-s" />
 | 
			
		||||
					<Add option="-m32" />
 | 
			
		||||
					<Add option="-static" />
 | 
			
		||||
					<Add library="Ws2_32" />
 | 
			
		||||
					<Add directory="../lib/mingw32" />
 | 
			
		||||
				</Linker>
 | 
			
		||||
				<ExtraCommands>
 | 
			
		||||
@@ -257,6 +263,7 @@
 | 
			
		||||
				<Linker>
 | 
			
		||||
					<Add option="-m64" />
 | 
			
		||||
					<Add option="-static" />
 | 
			
		||||
					<Add library="Ws2_32" />
 | 
			
		||||
					<Add directory="../lib/mingw64-d" />
 | 
			
		||||
				</Linker>
 | 
			
		||||
				<ExtraCommands>
 | 
			
		||||
@@ -284,6 +291,7 @@
 | 
			
		||||
					<Add option="-s" />
 | 
			
		||||
					<Add option="-m64" />
 | 
			
		||||
					<Add option="-static" />
 | 
			
		||||
					<Add library="Ws2_32" />
 | 
			
		||||
					<Add directory="../lib/mingw64" />
 | 
			
		||||
				</Linker>
 | 
			
		||||
				<ExtraCommands>
 | 
			
		||||
@@ -552,6 +560,8 @@
 | 
			
		||||
		<Unit filename="../source/Misc/Model.hpp" />
 | 
			
		||||
		<Unit filename="../source/Misc/Player.cpp" />
 | 
			
		||||
		<Unit filename="../source/Misc/Player.hpp" />
 | 
			
		||||
		<Unit filename="../source/Misc/Privileges.cpp" />
 | 
			
		||||
		<Unit filename="../source/Misc/Privileges.hpp" />
 | 
			
		||||
		<Unit filename="../source/Misc/Register.cpp" />
 | 
			
		||||
		<Unit filename="../source/Misc/Routine.cpp" />
 | 
			
		||||
		<Unit filename="../source/Misc/Routine.hpp" />
 | 
			
		||||
@@ -570,6 +580,7 @@
 | 
			
		||||
			<envvars />
 | 
			
		||||
			<debugger />
 | 
			
		||||
			<lib_finder disable_auto="1" />
 | 
			
		||||
			<fortran_project />
 | 
			
		||||
		</Extensions>
 | 
			
		||||
	</Project>
 | 
			
		||||
</CodeBlocks_project_file>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 | 
			
		||||
<CodeBlocks_workspace_file>
 | 
			
		||||
	<Workspace title="SqMod">
 | 
			
		||||
		<Project filename="Module.cbp" />
 | 
			
		||||
		<Project filename="Squirrel.cbp" />
 | 
			
		||||
		<Project filename="Module.cbp" />
 | 
			
		||||
		<Project filename="ModIRC.cbp" />
 | 
			
		||||
		<Project filename="ModXML.cbp" />
 | 
			
		||||
		<Project filename="ModSQLite.cbp" />
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								external/Squirrel/sqapiex.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								external/Squirrel/sqapiex.cpp
									
									
									
									
										vendored
									
									
								
							@@ -36,7 +36,7 @@ begin:
 | 
			
		||||
    return SQ_ERROR;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sqstd_pushstringf(HSQUIRRELVM v,const SQChar *s,...)
 | 
			
		||||
void sq_pushstringf(HSQUIRRELVM v,const SQChar *s,...)
 | 
			
		||||
{
 | 
			
		||||
    SQInteger n=256;
 | 
			
		||||
    va_list args;
 | 
			
		||||
 
 | 
			
		||||
@@ -84,6 +84,7 @@ extern "C" {
 | 
			
		||||
    typedef SQRESULT (*SqLibAPI_setclosureroot)(HSQUIRRELVM v,SQInteger idx);
 | 
			
		||||
    typedef SQRESULT (*SqLibAPI_getclosureroot)(HSQUIRRELVM v,SQInteger idx);
 | 
			
		||||
    typedef void (*SqLibAPI_pushstring)(HSQUIRRELVM v,const SQChar *s,SQInteger len);
 | 
			
		||||
    typedef void (*SqLibAPI_pushstringf)(HSQUIRRELVM v,const SQChar *s,...);
 | 
			
		||||
    typedef void (*SqLibAPI_pushfloat)(HSQUIRRELVM v,SQFloat f);
 | 
			
		||||
    typedef void (*SqLibAPI_pushinteger)(HSQUIRRELVM v,SQInteger n);
 | 
			
		||||
    typedef void (*SqLibAPI_pushbool)(HSQUIRRELVM v,SQBool b);
 | 
			
		||||
@@ -167,6 +168,7 @@ extern "C" {
 | 
			
		||||
    typedef const SQChar* (*SqLibAPI_getfreevariable)(HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger nval);
 | 
			
		||||
    typedef const SQChar* (*SqLibAPI_getonefreevariable)(HSQUIRRELVM v,SQUnsignedInteger nval);
 | 
			
		||||
    typedef SQRESULT (*SqLibAPI_throwerror)(HSQUIRRELVM v,const SQChar *err);
 | 
			
		||||
    typedef SQRESULT (*SqLibAPI_throwerrorf)(HSQUIRRELVM v,const SQChar *err,...);
 | 
			
		||||
    typedef SQRESULT (*SqLibAPI_throwobject)(HSQUIRRELVM v);
 | 
			
		||||
    typedef void (*SqLibAPI_reseterror)(HSQUIRRELVM v);
 | 
			
		||||
    typedef void (*SqLibAPI_getlasterror)(HSQUIRRELVM v);
 | 
			
		||||
@@ -275,6 +277,7 @@ extern "C" {
 | 
			
		||||
        SqLibAPI_setclosureroot                     setclosureroot;
 | 
			
		||||
        SqLibAPI_getclosureroot                     getclosureroot;
 | 
			
		||||
        SqLibAPI_pushstring                         pushstring;
 | 
			
		||||
        SqLibAPI_pushstringf                        pushstringf;
 | 
			
		||||
        SqLibAPI_pushfloat                          pushfloat;
 | 
			
		||||
        SqLibAPI_pushinteger                        pushinteger;
 | 
			
		||||
        SqLibAPI_pushbool                           pushbool;
 | 
			
		||||
@@ -358,6 +361,7 @@ extern "C" {
 | 
			
		||||
        SqLibAPI_getfreevariable                    getfreevariable;
 | 
			
		||||
        SqLibAPI_getonefreevariable                 getonefreevariable;
 | 
			
		||||
        SqLibAPI_throwerror                         throwerror;
 | 
			
		||||
        SqLibAPI_throwerrorf                        throwerrorf;
 | 
			
		||||
        SqLibAPI_throwobject                        throwobject;
 | 
			
		||||
        SqLibAPI_reseterror                         reseterror;
 | 
			
		||||
        SqLibAPI_getlasterror                       getlasterror;
 | 
			
		||||
@@ -462,6 +466,7 @@ extern "C" {
 | 
			
		||||
    extern SqLibAPI_setclosureroot                  SqLib_setclosureroot;
 | 
			
		||||
    extern SqLibAPI_getclosureroot                  SqLib_getclosureroot;
 | 
			
		||||
    extern SqLibAPI_pushstring                      SqLib_pushstring;
 | 
			
		||||
    extern SqLibAPI_pushstringf                     SqLib_pushstringf;
 | 
			
		||||
    extern SqLibAPI_pushfloat                       SqLib_pushfloat;
 | 
			
		||||
    extern SqLibAPI_pushinteger                     SqLib_pushinteger;
 | 
			
		||||
    extern SqLibAPI_pushbool                        SqLib_pushbool;
 | 
			
		||||
@@ -545,6 +550,7 @@ extern "C" {
 | 
			
		||||
    extern SqLibAPI_getfreevariable                 SqLib_getfreevariable;
 | 
			
		||||
    extern SqLibAPI_getonefreevariable              SqLib_getonefreevariable;
 | 
			
		||||
    extern SqLibAPI_throwerror                      SqLib_throwerror;
 | 
			
		||||
    extern SqLibAPI_throwerrorf                     SqLib_throwerrorf;
 | 
			
		||||
    extern SqLibAPI_throwobject                     SqLib_throwobject;
 | 
			
		||||
    extern SqLibAPI_reseterror                      SqLib_reseterror;
 | 
			
		||||
    extern SqLibAPI_getlasterror                    SqLib_getlasterror;
 | 
			
		||||
@@ -645,6 +651,7 @@ extern "C" {
 | 
			
		||||
    #define sq_setclosureroot                       SqLib_setclosureroot
 | 
			
		||||
    #define sq_getclosureroot                       SqLib_getclosureroot
 | 
			
		||||
    #define sq_pushstring                           SqLib_pushstring
 | 
			
		||||
    #define sq_pushstringf                          SqLib_pushstringf
 | 
			
		||||
    #define sq_pushfloat                            SqLib_pushfloat
 | 
			
		||||
    #define sq_pushinteger                          SqLib_pushinteger
 | 
			
		||||
    #define sq_pushbool                             SqLib_pushbool
 | 
			
		||||
@@ -728,6 +735,7 @@ extern "C" {
 | 
			
		||||
    #define sq_getfreevariable                      SqLib_getfreevariable
 | 
			
		||||
    #define sq_getonefreevariable                   SqLib_getonefreevariable
 | 
			
		||||
    #define sq_throwerror                           SqLib_throwerror
 | 
			
		||||
    #define sq_throwerrorf                          SqLib_throwerrorf
 | 
			
		||||
    #define sq_throwobject                          SqLib_throwobject
 | 
			
		||||
    #define sq_reseterror                           SqLib_reseterror
 | 
			
		||||
    #define sq_getlasterror                         SqLib_getlasterror
 | 
			
		||||
 
 | 
			
		||||
@@ -262,6 +262,7 @@ SqLibAPI_bindenv                            SqLib_bindenv
 | 
			
		||||
SqLibAPI_setclosureroot                     SqLib_setclosureroot                        = NULL;
 | 
			
		||||
SqLibAPI_getclosureroot                     SqLib_getclosureroot                        = NULL;
 | 
			
		||||
SqLibAPI_pushstring                         SqLib_pushstring                            = NULL;
 | 
			
		||||
SqLibAPI_pushstringf                        SqLib_pushstringf                           = NULL;
 | 
			
		||||
SqLibAPI_pushfloat                          SqLib_pushfloat                             = NULL;
 | 
			
		||||
SqLibAPI_pushinteger                        SqLib_pushinteger                           = NULL;
 | 
			
		||||
SqLibAPI_pushbool                           SqLib_pushbool                              = NULL;
 | 
			
		||||
@@ -343,8 +344,9 @@ SqLibAPI_resume                             SqLib_resume
 | 
			
		||||
SqLibAPI_getlocal                           SqLib_getlocal                              = NULL;
 | 
			
		||||
SqLibAPI_getcallee                          SqLib_getcallee                             = NULL;
 | 
			
		||||
SqLibAPI_getfreevariable                    SqLib_getfreevariable                       = NULL;
 | 
			
		||||
SqLibAPI_getonefreevariable                 SqLib_getonefreevariable                       = NULL;
 | 
			
		||||
SqLibAPI_getonefreevariable                 SqLib_getonefreevariable                    = NULL;
 | 
			
		||||
SqLibAPI_throwerror                         SqLib_throwerror                            = NULL;
 | 
			
		||||
SqLibAPI_throwerrorf                        SqLib_throwerrorf                           = NULL;
 | 
			
		||||
SqLibAPI_throwobject                        SqLib_throwobject                           = NULL;
 | 
			
		||||
SqLibAPI_reseterror                         SqLib_reseterror                            = NULL;
 | 
			
		||||
SqLibAPI_getlasterror                       SqLib_getlasterror                          = NULL;
 | 
			
		||||
@@ -456,6 +458,7 @@ uint8_t sqlib_api_expand(HSQLIBAPI sqlibapi)
 | 
			
		||||
    SqLib_setclosureroot                        = sqlibapi->setclosureroot;
 | 
			
		||||
    SqLib_getclosureroot                        = sqlibapi->getclosureroot;
 | 
			
		||||
    SqLib_pushstring                            = sqlibapi->pushstring;
 | 
			
		||||
    SqLib_pushstringf                           = sqlibapi->pushstringf;
 | 
			
		||||
    SqLib_pushfloat                             = sqlibapi->pushfloat;
 | 
			
		||||
    SqLib_pushinteger                           = sqlibapi->pushinteger;
 | 
			
		||||
    SqLib_pushbool                              = sqlibapi->pushbool;
 | 
			
		||||
@@ -539,6 +542,7 @@ uint8_t sqlib_api_expand(HSQLIBAPI sqlibapi)
 | 
			
		||||
    SqLib_getfreevariable                       = sqlibapi->getfreevariable;
 | 
			
		||||
    SqLib_getonefreevariable                    = sqlibapi->getonefreevariable;
 | 
			
		||||
    SqLib_throwerror                            = sqlibapi->throwerror;
 | 
			
		||||
    SqLib_throwerrorf                           = sqlibapi->throwerrorf;
 | 
			
		||||
    SqLib_throwobject                           = sqlibapi->throwobject;
 | 
			
		||||
    SqLib_reseterror                            = sqlibapi->reseterror;
 | 
			
		||||
    SqLib_getlasterror                          = sqlibapi->getlasterror;
 | 
			
		||||
@@ -649,6 +653,7 @@ void sqlib_api_collapse()
 | 
			
		||||
    SqLib_setclosureroot                        = NULL;
 | 
			
		||||
    SqLib_getclosureroot                        = NULL;
 | 
			
		||||
    SqLib_pushstring                            = NULL;
 | 
			
		||||
    SqLib_pushstringf                           = NULL;
 | 
			
		||||
    SqLib_pushfloat                             = NULL;
 | 
			
		||||
    SqLib_pushinteger                           = NULL;
 | 
			
		||||
    SqLib_pushbool                              = NULL;
 | 
			
		||||
@@ -732,6 +737,7 @@ void sqlib_api_collapse()
 | 
			
		||||
    SqLib_getfreevariable                       = NULL;
 | 
			
		||||
    SqLib_getonefreevariable                    = NULL;
 | 
			
		||||
    SqLib_throwerror                            = NULL;
 | 
			
		||||
    SqLib_throwerrorf                           = NULL;
 | 
			
		||||
    SqLib_throwobject                           = NULL;
 | 
			
		||||
    SqLib_reseterror                            = NULL;
 | 
			
		||||
    SqLib_getlasterror                          = NULL;
 | 
			
		||||
 
 | 
			
		||||
@@ -771,6 +771,7 @@ static int32_t SqExport_PopulateSquirrelAPI(HSQLIBAPI api, size_t size)
 | 
			
		||||
    api->setclosureroot                 = sq_setclosureroot;
 | 
			
		||||
    api->getclosureroot                 = sq_getclosureroot;
 | 
			
		||||
    api->pushstring                     = sq_pushstring;
 | 
			
		||||
    api->pushstringf                    = sq_pushstringf;
 | 
			
		||||
    api->pushfloat                      = sq_pushfloat;
 | 
			
		||||
    api->pushinteger                    = sq_pushinteger;
 | 
			
		||||
    api->pushbool                       = sq_pushbool;
 | 
			
		||||
@@ -854,6 +855,7 @@ static int32_t SqExport_PopulateSquirrelAPI(HSQLIBAPI api, size_t size)
 | 
			
		||||
    api->getfreevariable                = sq_getfreevariable;
 | 
			
		||||
    api->getonefreevariable             = sq_getonefreevariable;
 | 
			
		||||
    api->throwerror                     = sq_throwerror;
 | 
			
		||||
    api->throwerrorf                    = sq_throwerrorf;
 | 
			
		||||
    api->throwobject                    = sq_throwobject;
 | 
			
		||||
    api->reseterror                     = sq_reseterror;
 | 
			
		||||
    api->getlasterror                   = sq_getlasterror;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user