rename and negate DISABLE_PYTHON --> WITH_PYTHON
[blender.git] / source / gameengine / Expressions / Value.h
index 5f08736afde1706e53f8e3c0333fd4b3a83b02b6..e6ea431ec1c4bada2eb09e345658fe6c021a2f88 100644 (file)
@@ -13,7 +13,7 @@
  *
  */
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
 #pragma warning (disable:4786)
 #endif //WIN32
 
@@ -181,7 +181,7 @@ public:
        
 #ifdef WITH_CXX_GUARDEDALLOC
 public:
-       void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:CAction"); }
+       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CAction"); }
        void operator delete( void *mem ) { MEM_freeN(mem); }
 #endif
 };
@@ -197,19 +197,14 @@ public:
 
 
 
-#ifndef NO_EXP_PYTHON_EMBEDDING
 #include "PyObjectPlus.h"
+#ifdef WITH_PYTHON
 #include "object.h"
+#endif
 class CValue  : public PyObjectPlus
-#else
-class CValue  
-#endif //NO_EXP_PYTHON_EMBEDDING
-
 
 {
-#ifndef NO_EXP_PYTHON_EMBEDDING
 Py_Header;
-#endif //NO_EXP_PYTHON_EMBEDDING
 public:
        enum AllocationTYPE {
                STACKVALUE              = 0,
@@ -224,9 +219,9 @@ public:
 
 
        // Construction / Destruction
-#ifndef NO_EXP_PYTHON_EMBEDDING
-
        CValue();
+
+#ifdef WITH_PYTHON
        //static PyObject*      PyMake(PyObject*,PyObject*);
        virtual PyObject *py_repr(void)
        {
@@ -242,12 +237,7 @@ public:
        static PyObject * pyattr_get_name(void * self, const KX_PYATTRIBUTE_DEF * attrdef);
        
        virtual PyObject* ConvertKeysToPython( void );
-       
-       KX_PYMETHOD_NOARGS(CValue,GetName);
-
-#else
-       CValue();
-#endif //NO_EXP_PYTHON_EMBEDDING
+#endif // WITH_PYTHON
 
        
        
@@ -418,12 +408,8 @@ public:                                                                                                                                                                                                    \
 class CPropValue : public CValue
 {
 public:
-#ifndef NO_EXP_PYTHON_EMBEDDING        
        CPropValue() :
          CValue(),
-#else
-       CPropValue() :
-#endif //NO_EXP_PYTHON_EMBEDDING
                m_strNewName()
 
        {
@@ -450,7 +436,7 @@ protected:
 
 #ifdef WITH_CXX_GUARDEDALLOC
 public:
-       void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:CPropValue"); }
+       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CPropValue"); }
        void operator delete( void *mem ) { MEM_freeN(mem); }
 #endif
 };