Explorar el Código

move TARGET and STK to sqvm.cpp instead of SQ to reduce probability of collisions in case inner headers are included

zeromus hace 10 años
padre
commit
7bb5dd4982
Se han modificado 2 ficheros con 2 adiciones y 3 borrados
  1. 2 0
      squirrel/sqvm.cpp
  2. 0 3
      squirrel/sqvm.h

+ 2 - 0
squirrel/sqvm.cpp

@@ -15,6 +15,8 @@
 #include "sqclass.h"
 
 #define TOP() (_stack._vals[_top-1])
+#define TARGET _stack._vals[_stackbase+arg0]
+#define STK(a) _stack._vals[_stackbase+(a)]
 
 bool SQVM::BW_OP(SQUnsignedInteger op,SQObjectPtr &trg,const SQObjectPtr &o1,const SQObjectPtr &o2)
 {

+ 0 - 3
squirrel/sqvm.h

@@ -28,9 +28,6 @@ struct SQExceptionTrap{
 
 #define _INLINE
 
-#define STK(a) _stack._vals[_stackbase+(a)]
-#define TARGET _stack._vals[_stackbase+arg0]
-
 typedef sqvector<SQExceptionTrap> ExceptionsTraps;
 
 struct SQVM : public CHAINABLE_OBJ