diff options
author | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-08 23:01:08 +0200 |
---|---|---|
committer | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-08 23:01:08 +0200 |
commit | 083228a10dffcaa77b1d0035c29013c6802befd4 (patch) | |
tree | 4d8ba1ce8501f044d10135e836e6f956f1b99fa4 /squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.h | |
parent | Added a lilypad finisher (diff) | |
download | cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.gz cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.bz2 cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.lz cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.xz cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.zst cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.zip |
Diffstat (limited to '')
-rw-r--r-- | squirrel_3_0_1_stable/_OLD_sqplus/SquirrelBindingsUtilsWin32.h (renamed from squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.h) | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.h b/squirrel_3_0_1_stable/_OLD_sqplus/SquirrelBindingsUtilsWin32.h index 3f3358422..0acd05147 100644 --- a/squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.h +++ b/squirrel_3_0_1_stable/_OLD_sqplus/SquirrelBindingsUtilsWin32.h @@ -1,41 +1,41 @@ -#ifndef SQUIRREL_BINDINGS_UTILS_WIN32_H -#define SQUIRREL_BINDINGS_UTILS_WIN32_H - -#ifndef _INC_WINDOWS -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -// Windows Header Files: -#include <windows.h> -#endif -#ifndef __IUnknown_INTERFACE_DEFINED__ -#include <unknwn.h> -#endif - -#ifndef SQUIRREL_BINDINGS_UTILS_H -#include "SquirrelBindingsUtils.h" -#endif - -#define _DECLARE_REFCOUNTED_NEW(cppclass,classname) \ - SquirrelObject new_##classname(cppclass *ptr) { \ - if(CreateRefCountedInstance(SquirrelVM::GetVMPtr(),_SC(#classname),ptr)) { \ - HSQOBJECT o; \ - sq_getstackobj(SquirrelVM::GetVMPtr(),-1,&o); \ - SquirrelObject tmp = o; \ - sq_pop(SquirrelVM::GetVMPtr(),1); \ - return tmp; \ - } \ - return SquirrelObject() ; \ - } - -#define _RETURN_REFCOUNTED_INSTANCE(classname,ptr) \ - if(!CreateRefCountedInstance(SquirrelVM::GetVMPtr(),_SC(#classname),ptr)) { \ - return sa.ThrowError(_SC("cannot create the class instance")); \ - } \ - return 1; - -BOOL CreateRefCountedInstance(HSQUIRRELVM v,const SQChar *classname,IUnknown *pRC); -BOOL CreateRefCountedInstanceChached(HSQUIRRELVM v,const SQChar *classname,IUnknown *pRC); -int refcounted_release_hook(SQUserPointer p, int size); -int construct_RefCounted(IUnknown *p); - -#endif // SQUIRREL_BINDINGS_UTILS_WIN32_H - +#ifndef SQUIRREL_BINDINGS_UTILS_WIN32_H
+#define SQUIRREL_BINDINGS_UTILS_WIN32_H
+
+#ifndef _INC_WINDOWS
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files:
+#include <windows.h>
+#endif
+#ifndef __IUnknown_INTERFACE_DEFINED__
+#include <unknwn.h>
+#endif
+
+#ifndef SQUIRREL_BINDINGS_UTILS_H
+#include "SquirrelBindingsUtils.h"
+#endif
+
+#define _DECLARE_REFCOUNTED_NEW(cppclass,classname) \
+ SquirrelObject new_##classname(cppclass *ptr) { \
+ if(CreateRefCountedInstance(SquirrelVM::GetVMPtr(),_SC(#classname),ptr)) { \
+ HSQOBJECT o; \
+ sq_getstackobj(SquirrelVM::GetVMPtr(),-1,&o); \
+ SquirrelObject tmp = o; \
+ sq_pop(SquirrelVM::GetVMPtr(),1); \
+ return tmp; \
+ } \
+ return SquirrelObject() ; \
+ }
+
+#define _RETURN_REFCOUNTED_INSTANCE(classname,ptr) \
+ if(!CreateRefCountedInstance(SquirrelVM::GetVMPtr(),_SC(#classname),ptr)) { \
+ return sa.ThrowError(_SC("cannot create the class instance")); \
+ } \
+ return 1;
+
+BOOL CreateRefCountedInstance(HSQUIRRELVM v,const SQChar *classname,IUnknown *pRC);
+BOOL CreateRefCountedInstanceChached(HSQUIRRELVM v,const SQChar *classname,IUnknown *pRC);
+int refcounted_release_hook(SQUserPointer p, int size);
+int construct_RefCounted(IUnknown *p);
+
+#endif // SQUIRREL_BINDINGS_UTILS_WIN32_H
+
|