Patch #3286 2012-05-01 10:36
worldcitizen
Patch (by Dimstar) to fix squirrel build error:Bug #18595- Download
- 3286-Patch_by_Dimst.patch (1.4 KB)
Index: SQUIRREL3/squirrel/sqmem.h
===================================================================
--- /dev/null
+++ SQUIRREL3/squirrel/sqmem.h
@@ -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: SQUIRREL3/squirrel/sqstate.h
===================================================================
--- SQUIRREL3.orig/squirrel/sqstate.h
+++ SQUIRREL3/squirrel/sqstate.h
@@ -141,8 +141,4 @@ extern SQObjectPtr _null_;
//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: SQUIRREL3/squirrel/squtils.h
===================================================================
--- SQUIRREL3.orig/squirrel/squtils.h
+++ SQUIRREL3/squirrel/squtils.h
@@ -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));
History
mortenmacfly 2012-06-17 07:45
Applied in SVN HEAD. Thank you.