mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-21 17:47:13 +02:00
Back port changes to squirrel library. Separate mdoule speciffic changes and/or additions to squirrel into their own files.
This commit is contained in:
@ -59,7 +59,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include "sqrat/sqratTable.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include <string.h>
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include <string.h>
|
||||
|
@ -31,11 +31,10 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include <typeinfo>
|
||||
#include <squirrel.h>
|
||||
|
||||
#include "sqratObject.h"
|
||||
#include "sqratClassType.h"
|
||||
@ -718,7 +717,6 @@ protected:
|
||||
|
||||
// constructor binding
|
||||
Class& BindConstructor(SQFUNCTION constructor, SQInteger nParams, const SQChar *name = 0) {
|
||||
SQFUNCTION overload = &OverloadConstructionForwarder;
|
||||
// Decide whether to bind to a class or the root table
|
||||
bool alternative_global = false;
|
||||
if (name == 0)
|
||||
@ -734,12 +732,12 @@ protected:
|
||||
// The containing environment is the root table??
|
||||
else sq_pushroottable(vm);
|
||||
|
||||
// Bind overload handler
|
||||
// Bind overload handler name
|
||||
sq_pushstring(vm, name, -1);
|
||||
// function name is passed as a free variable
|
||||
//sq_pushstring(vm, name, -1);
|
||||
sq_push(vm, -1); // <- Let's cheat(?) by pushing the same object
|
||||
sq_newclosure(vm, overload, 1);
|
||||
sq_newclosure(vm, &OverloadConstructionForwarder, 1);
|
||||
// Set the closure name (for debug purposes)
|
||||
sq_setnativeclosurename(vm, -1, name);
|
||||
// Include it into the object
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include <typeinfo>
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include <string.h>
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include "sqratObject.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include "sqratTypes.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include "sqratTypes.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include <string.h>
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include "sqratTypes.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#include <sqstdio.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include <string.h>
|
||||
|
@ -34,7 +34,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#include <string>
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifdef SQMOD_PLUGIN_API
|
||||
#include <SqAPI.h>
|
||||
#else
|
||||
#include <squirrel.h>
|
||||
#include <squirrelex.h>
|
||||
#include <sqstdstring.h>
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
|
@ -9,6 +9,8 @@ extern "C" {
|
||||
SQUIRREL_API void sqstd_seterrorhandlers(HSQUIRRELVM v);
|
||||
SQUIRREL_API void sqstd_printcallstack(HSQUIRRELVM v);
|
||||
|
||||
SQUIRREL_API SQRESULT sqstd_throwerrorf(HSQUIRRELVM v,const SQChar *err,...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
@ -24,6 +24,8 @@ SQUIRREL_API SQBool sqstd_rex_getsubexp(SQRex* exp, SQInteger n, SQRexMatch *sub
|
||||
|
||||
SQUIRREL_API SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen,SQChar **output);
|
||||
|
||||
SQUIRREL_API void sqstd_pushstringf(HSQUIRRELVM v,const SQChar *s,...);
|
||||
|
||||
SQUIRREL_API SQRESULT sqstd_register_stringlib(HSQUIRRELVM v);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -281,7 +281,6 @@ SQUIRREL_API SQRESULT sq_getfunctioninfo(HSQUIRRELVM v,SQInteger level,SQFunctio
|
||||
SQUIRREL_API SQRESULT sq_getclosureinfo(HSQUIRRELVM v,SQInteger idx,SQInteger *nparams,SQInteger *nfreevars);
|
||||
SQUIRREL_API SQRESULT sq_getclosurename(HSQUIRRELVM v,SQInteger idx);
|
||||
SQUIRREL_API SQRESULT sq_setnativeclosurename(HSQUIRRELVM v,SQInteger idx,const SQChar *name);
|
||||
SQUIRREL_API SQRESULT sq_getnativeclosurepointer(HSQUIRRELVM v,SQInteger idx,SQFUNCTION *f);
|
||||
SQUIRREL_API SQRESULT sq_setinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer p);
|
||||
SQUIRREL_API SQRESULT sq_getinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer *p,SQUserPointer typetag);
|
||||
SQUIRREL_API SQRESULT sq_setclassudsize(HSQUIRRELVM v, SQInteger idx, SQInteger udsize);
|
||||
|
25
include/squirrelex.h
Normal file
25
include/squirrelex.h
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
see copyright notice in squirrel.h
|
||||
*/
|
||||
#ifndef _SQUIRRELEX_H_
|
||||
#define _SQUIRRELEX_H_
|
||||
|
||||
#include <squirrel.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef SQMOD_PLUGIN_API
|
||||
|
||||
SQUIRREL_API SQRESULT sq_throwerrorf(HSQUIRRELVM v,const SQChar *err,...);
|
||||
SQUIRREL_API void sq_pushstringf(HSQUIRRELVM v,const SQChar *s,...);
|
||||
SQUIRREL_API SQRESULT sq_getnativeclosurepointer(HSQUIRRELVM v,SQInteger idx,SQFUNCTION *f);
|
||||
|
||||
#endif // SQMOD_PLUGIN_API
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*_SQUIRRELEX_H_*/
|
Reference in New Issue
Block a user