瀏覽代碼

Added an sq_assert macro like the lua_assert in Lua.

mingodad 13 年之前
父節點
當前提交
f2eaed27b2
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      include/squirrel.h

+ 4 - 0
include/squirrel.h

@@ -321,6 +321,10 @@ typedef struct tagSQFunctionInfo {
 	const SQChar *source;
 	const SQChar *source;
 }SQFunctionInfo;
 }SQFunctionInfo;
 
 
+#if !defined(sq_assert)
+#define sq_assert(x)	((void)0)
+#endif
+
 /*vm*/
 /*vm*/
 SQUIRREL_API HSQUIRRELVM sq_open(SQInteger initialstacksize);
 SQUIRREL_API HSQUIRRELVM sq_open(SQInteger initialstacksize);
 SQUIRREL_API HSQUIRRELVM sq_newthread(HSQUIRRELVM friendvm, SQInteger initialstacksize);
 SQUIRREL_API HSQUIRRELVM sq_newthread(HSQUIRRELVM friendvm, SQInteger initialstacksize);