Change to squirrel code to fix gcc 4.7 build errors, patch by Dimstar (bug 933).
authorLMH <lmh.0013@gmail.com>
Sat, 19 May 2012 20:14:12 +0000 (10:14 -1000)
committerLMH <lmh.0013@gmail.com>
Sat, 19 May 2012 20:14:12 +0000 (10:14 -1000)
external/squirrel/squirrel/sqmem.h [new file with mode: 0644]
external/squirrel/squirrel/sqstate.h
external/squirrel/squirrel/squtils.h

diff --git a/external/squirrel/squirrel/sqmem.h b/external/squirrel/squirrel/sqmem.h
new file mode 100644 (file)
index 0000000..38b219a
--- /dev/null
@@ -0,0 +1,8 @@
+/*     see copyright notice in squirrel.h */
+#ifndef _SQMEM_H_
+#define _SQMEM_H_
+
+void *sq_vm_malloc(SQUnsignedInteger size);
+void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
+void sq_vm_free(void *p,SQUnsignedInteger size);
+#endif //_SQMEM_H_
index a0b739c..cb38fd5 100644 (file)
@@ -136,8 +136,4 @@ extern SQObjectPtr _one_;
 extern SQObjectPtr _minusone_;
 
 bool CompileTypemask(SQIntVec &res,const SQChar *typemask);
-
-void *sq_vm_malloc(SQUnsignedInteger size);
-void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
-void sq_vm_free(void *p,SQUnsignedInteger size);
 #endif //_SQSTATE_H_
index b6a436e..9f25336 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _SQUTILS_H_
 #define _SQUTILS_H_
 
+#include "sqmem.h"
+
 #define sq_new(__ptr,__type) {__ptr=(__type *)sq_vm_malloc(sizeof(__type));new (__ptr) __type;}
 #define sq_delete(__ptr,__type) {__ptr->~__type();sq_vm_free(__ptr,sizeof(__type));}
 #define SQ_MALLOC(__size) sq_vm_malloc((__size));