* removed typedefs that were not used (from anonymous enums and structs)
authorCampbell Barton <ideasman42@gmail.com>
Sat, 21 Feb 2009 12:43:24 +0000 (12:43 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 21 Feb 2009 12:43:24 +0000 (12:43 +0000)
* Missed some cases of using a 'char *' as an attribute
* replace BGE's Py_Return macro with Pythons Py_RETURN_NONE
* other minor warnings removed

40 files changed:
source/gameengine/Converter/BL_ShapeActionActuator.cpp
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
source/gameengine/GameLogic/SCA_DelaySensor.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GameLogic/SCA_MouseSensor.cpp
source/gameengine/GameLogic/SCA_PropertyActuator.cpp
source/gameengine/GameLogic/SCA_PropertySensor.cpp
source/gameengine/GameLogic/SCA_RandomActuator.cpp
source/gameengine/GameLogic/SCA_RandomSensor.cpp
source/gameengine/Ketsji/BL_Shader.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_CDActuator.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_Camera.h
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_ConstraintActuator.cpp
source/gameengine/Ketsji/KX_GameActuator.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IpoActuator.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_RaySensor.cpp
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
source/gameengine/Ketsji/KX_SceneActuator.cpp
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_StateActuator.cpp
source/gameengine/Ketsji/KX_TouchSensor.cpp
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Ketsji/KX_VisibilityActuator.cpp
source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
source/gameengine/Physics/common/PHY_DynamicTypes.h

index 7cba6b0..2e02ee9 100644 (file)
@@ -911,6 +911,6 @@ PyObject* BL_ShapeActionActuator::PySetType(PyObject* self,
                printf("Invalid type for action actuator: %d\n", typeArg); /* error */
     }
        
-    Py_Return;
+    Py_RETURN_NONE;
 }
 
index 3cf22bd..b8a8a1a 100644 (file)
@@ -429,7 +429,7 @@ PyObject* CListValue::Pyreverse(PyObject* self,
 {
        std::reverse(m_pValueArray.begin(),m_pValueArray.end());
 
-       Py_Return;
+       Py_RETURN_NONE;
        
 }
 
index 16184b7..2c4fbd5 100644 (file)
@@ -697,7 +697,6 @@ bool PyObjectPlus::isA(const char *mytypename)              // check typename of each parent
 
 PyObject *PyObjectPlus::Py_isA(PyObject *value)                // Python wrapper for isA
 {
-  char *mytypename;
   if (!PyString_Check(value)) {
     PyErr_SetString(PyExc_TypeError, "expected a string");
     return NULL;
index 5ba894e..0fae175 100644 (file)
@@ -72,9 +72,6 @@ typedef int Py_ssize_t;
 #define PY_METHODCHAR const char *
 #endif
 
-                                                               // some basic python macros
-#define Py_Return { Py_INCREF(Py_None); return Py_None;}
-
 static inline void Py_Fatal(const char *M) {
        //cout << M << endl; 
        exit(-1);
@@ -394,10 +391,10 @@ public:
                                                                        // isA methods
        bool isA(PyTypeObject *T);
        bool isA(const char *mytypename);
-       PyObject *Py_isA(PyObject *args);
-       static PyObject *sPy_isA(PyObject *self, PyObject *args, PyObject *kwd)
+       PyObject *Py_isA(PyObject *value);
+       static PyObject *sPy_isA(PyObject *self, PyObject *value)
        {
-               return ((PyObjectPlus*)self)->Py_isA(args);
+               return ((PyObjectPlus*)self)->Py_isA(value);
        }
 };
 
index dcdd7df..7f8dbef 100644 (file)
@@ -221,7 +221,7 @@ PyObject* SCA_ActuatorSensor::PySetActuator(PyObject* self, PyObject* args, PyOb
        } else {
                ; /* error: bad actuator name */
        }
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* eof */
index 802edc4..25c9888 100644 (file)
@@ -211,7 +211,7 @@ PyObject* SCA_DelaySensor::PySetDelay(PyObject* self, PyObject* args, PyObject*
                return NULL;
        }
        m_delay = delay;
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 const char SCA_DelaySensor::SetDuration_doc[] = 
@@ -233,7 +233,7 @@ PyObject* SCA_DelaySensor::PySetDuration(PyObject* self, PyObject* args, PyObjec
                return NULL;
        }
        m_duration = duration;
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 const char SCA_DelaySensor::SetRepeat_doc[] = 
@@ -250,7 +250,7 @@ PyObject* SCA_DelaySensor::PySetRepeat(PyObject* self, PyObject* args, PyObject*
                return NULL;
        }
        m_repeat = (repeat != 0);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 const char SCA_DelaySensor::GetDelay_doc[] = 
index 70938db..49d39f7 100644 (file)
@@ -324,7 +324,7 @@ PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* self,
        
        m_Execute_Ueber_Priority = priority;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
index 73475b0..e8a072f 100644 (file)
@@ -264,7 +264,7 @@ PyObject* SCA_ISensor::PySetUsePosPulseMode(PyObject* self, PyObject* args, PyOb
        int pyarg = 0;
        if(!PyArg_ParseTuple(args, "i", &pyarg)) { return NULL; }
        m_pos_pulsemode = PyArgToBool(pyarg);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /**
@@ -303,7 +303,7 @@ PyObject* SCA_ISensor::PySetFrequency(PyObject* self, PyObject* args, PyObject*
        };      
        m_pulse_frequency = pulse_frequencyArg;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -326,7 +326,7 @@ PyObject* SCA_ISensor::PySetInvert(PyObject* self, PyObject* args, PyObject* kwd
        int pyarg = 0;
        if(!PyArg_ParseTuple(args, "i", &pyarg)) { return NULL; }
        m_invert = PyArgToBool(pyarg);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 const char SCA_ISensor::GetLevel_doc[] = 
@@ -352,7 +352,7 @@ PyObject* SCA_ISensor::PySetLevel(PyObject* self, PyObject* args, PyObject* kwds
        int pyarg = 0;
        if(!PyArg_ParseTuple(args, "i", &pyarg)) { return NULL; }
        m_level = PyArgToBool(pyarg);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 const char SCA_ISensor::GetUseNegPulseMode_doc[] = 
@@ -375,7 +375,7 @@ PyObject* SCA_ISensor::PySetUseNegPulseMode(PyObject* self, PyObject* args, PyOb
        int pyarg = 0;
        if(!PyArg_ParseTuple(args, "i", &pyarg)) { return NULL; }
        m_neg_pulsemode = PyArgToBool(pyarg);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 //<------Deprecated
 
@@ -385,7 +385,7 @@ KX_PYMETHODDEF_DOC_NOARGS(SCA_ISensor, reset,
 "\tThe sensor is put in its initial state as if it was just activated.\n")
 {
        Init();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* ----------------------------------------------- */
index 0edc41b..324e5ea 100644 (file)
@@ -577,7 +577,7 @@ PyObject* SCA_KeyboardSensor::PySetKey(PyObject* self, PyObject* args, PyObject*
        /* anything. It's up to the user to provide a sensible number.           */
        m_hotkey = keyCode;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /** 3. GetHold1 : set the first bucky bit */
@@ -609,7 +609,7 @@ PyObject* SCA_KeyboardSensor::PySetHold1(PyObject* self, PyObject* args, PyObjec
        /* anything. It's up to the user to provide a sensible number.           */
        m_qual = keyCode;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
        
 /** 5. GetHold2 : get the second bucky bit */
@@ -641,7 +641,7 @@ PyObject* SCA_KeyboardSensor::PySetHold2(PyObject* self, PyObject* args, PyObjec
        /* anything. It's up to the user to provide a sensible number.           */
        m_qual2 = keyCode;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
        
@@ -682,7 +682,7 @@ PyObject* SCA_KeyboardSensor::PyGetPressedKeys(PyObject* self, PyObject* args, P
                if (index>0) return resultlist;
        }
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -725,7 +725,7 @@ SCA_IInputDevice* inputdev = m_pKeyboardMgr->GetInputDevice();
                if (index > 0) return resultlist;
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 //<---- Deprecated
 
@@ -770,7 +770,7 @@ KX_PYMETHODDEF_DOC_O(SCA_KeyboardSensor, getKeyStatus,
                return PyInt_FromLong(inevent.m_status);
        }
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* ------------------------------------------------------------------------- */
index 73f784b..4f4d62f 100644 (file)
@@ -292,7 +292,7 @@ KX_PYMETHODDEF_DOC_O(SCA_MouseSensor, getButtonStatus,
                return PyInt_FromLong(event.m_status);
        }
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* ------------------------------------------------------------------------- */
index 644b82a..c9ace08 100644 (file)
@@ -298,7 +298,7 @@ PyObject* SCA_PropertyActuator::PySetProperty(PyObject* self, PyObject* args, Py
        }
        prop->Release();
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 2. getProperty                                                        */
@@ -328,7 +328,7 @@ PyObject* SCA_PropertyActuator::PySetValue(PyObject* self, PyObject* args, PyObj
        
        if (valArg)     m_exprtxt = valArg;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 4. getValue                                                        */
index 10d4976..d683c8b 100644 (file)
@@ -397,7 +397,7 @@ PyObject* SCA_PropertySensor::PySetType(PyObject* self, PyObject* args, PyObject
                m_checktype =  typeArg;
        }
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 3. getProperty */
@@ -434,7 +434,7 @@ PyObject* SCA_PropertySensor::PySetProperty(PyObject* self, PyObject* args, PyOb
                ; /* error: bad property name */
        }
        prop->Release();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 5. getValue */
@@ -470,7 +470,7 @@ PyObject* SCA_PropertySensor::PySetValue(PyObject* self, PyObject* args, PyObjec
                m_checkpropval = oldval;
                return NULL;
        }       
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* eof */
index 7aa25d2..d6c73f2 100644 (file)
@@ -413,7 +413,7 @@ PyObject* SCA_RandomActuator::PySetSeed(PyObject* self, PyObject* args, PyObject
        
        m_base->SetSeed(seedArg);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 2. getSeed                                                            */
 const char SCA_RandomActuator::GetSeed_doc[] = 
@@ -478,7 +478,7 @@ PyObject* SCA_RandomActuator::PySetProperty(PyObject* self, PyObject* args, PyOb
        }
        prop->Release();
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 10. getProperty                                                       */
 const char SCA_RandomActuator::GetProperty_doc[] = 
@@ -506,7 +506,7 @@ PyObject* SCA_RandomActuator::PySetBoolConst(PyObject* self,
        m_distribution = KX_RANDOMACT_BOOL_CONST;
        m_parameter1 = (paraArg) ? 1.0 : 0.0;
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 12. setBoolUniform, */
 const char SCA_RandomActuator::SetBoolUniform_doc[] = 
@@ -518,7 +518,7 @@ PyObject* SCA_RandomActuator::PySetBoolUniform(PyObject* self,
        /* no args */
        m_distribution = KX_RANDOMACT_BOOL_UNIFORM;
        enforceConstraints();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 13. setBoolBernouilli,  */
 const char SCA_RandomActuator::SetBoolBernouilli_doc[] = 
@@ -536,7 +536,7 @@ PyObject* SCA_RandomActuator::PySetBoolBernouilli(PyObject* self,
        m_distribution = KX_RANDOMACT_BOOL_BERNOUILLI;
        m_parameter1 = paraArg; 
        enforceConstraints();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 14. setIntConst,*/
 const char SCA_RandomActuator::SetIntConst_doc[] = 
@@ -554,7 +554,7 @@ PyObject* SCA_RandomActuator::PySetIntConst(PyObject* self,
        m_distribution = KX_RANDOMACT_INT_CONST;
        m_parameter1 = paraArg;
        enforceConstraints();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 15. setIntUniform,*/
 const char SCA_RandomActuator::SetIntUniform_doc[] = 
@@ -575,7 +575,7 @@ PyObject* SCA_RandomActuator::PySetIntUniform(PyObject* self,
        m_parameter1 = paraArg1;
        m_parameter2 = paraArg2;
        enforceConstraints();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 16. setIntPoisson,          */
 const char SCA_RandomActuator::SetIntPoisson_doc[] = 
@@ -595,7 +595,7 @@ PyObject* SCA_RandomActuator::PySetIntPoisson(PyObject* self,
        m_distribution = KX_RANDOMACT_INT_POISSON;
        m_parameter1 = paraArg; 
        enforceConstraints();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 17. setFloatConst,*/
 const char SCA_RandomActuator::SetFloatConst_doc[] = 
@@ -613,7 +613,7 @@ PyObject* SCA_RandomActuator::PySetFloatConst(PyObject* self,
        m_distribution = KX_RANDOMACT_FLOAT_CONST;
        m_parameter1 = paraArg; 
        enforceConstraints();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 18. setFloatUniform, */
 const char SCA_RandomActuator::SetFloatUniform_doc[] = 
@@ -634,7 +634,7 @@ PyObject* SCA_RandomActuator::PySetFloatUniform(PyObject* self,
        m_parameter1 = paraArg1;
        m_parameter2 = paraArg2;
        enforceConstraints();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 19. setFloatNormal, */
 const char SCA_RandomActuator::SetFloatNormal_doc[] = 
@@ -655,7 +655,7 @@ PyObject* SCA_RandomActuator::PySetFloatNormal(PyObject* self,
        m_parameter1 = paraArg1;
        m_parameter2 = paraArg2;
        enforceConstraints();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 20. setFloatNegativeExponential, */
 const char SCA_RandomActuator::SetFloatNegativeExponential_doc[] = 
@@ -674,7 +674,7 @@ PyObject* SCA_RandomActuator::PySetFloatNegativeExponential(PyObject* self,
        m_distribution = KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL;
        m_parameter1 = paraArg; 
        enforceConstraints();
-       Py_Return;
+       Py_RETURN_NONE;
 }
        
 /* eof */
index 5a1bd10..5354c12 100644 (file)
@@ -209,7 +209,7 @@ PyObject* SCA_RandomSensor::PySetSeed(PyObject* self, PyObject* args, PyObject*
        
        m_basegenerator->SetSeed(seedArg);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 2. getSeed                                                            */
index 0c57b2d..2a4a74d 100644 (file)
@@ -796,7 +796,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setSource," setSource(vertexProgram, fragmentProg
        if(mShader !=0 && mOk  )
        {
                // already set...
-               Py_Return;
+               Py_RETURN_NONE;
        }
        char *v,*f;
        int apply=0;
@@ -807,12 +807,12 @@ KX_PYMETHODDEF_DOC( BL_Shader, setSource," setSource(vertexProgram, fragmentProg
                if( LinkProgram() ) {
                        glUseProgramObjectARB( mShader );
                        mUse = apply!=0;
-                       Py_Return;
+                       Py_RETURN_NONE;
                }
                vertProg = 0;
                fragProg = 0;
                mUse = 0;
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -827,7 +827,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, delSource, "delSource( )" )
        mShader         = 0;
        mOk                     = 0;
        mUse            = 0;
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 KX_PYMETHODDEF_DOC( BL_Shader, isValid, "isValid()" )
@@ -871,7 +871,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, validate, "validate()")
                MEM_freeN(logInf);
                logInf=0;
        }
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -912,7 +912,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setNumberOfPasses, "setNumberOfPasses( max-pass )
                return NULL;
 
        mPass = 1;
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /// access functions
@@ -935,7 +935,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform1f, "setUniform1f(name, fx)" )
                        SetUniform( loc, (float)value );
 #endif
                }
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -959,7 +959,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform2f , "setUniform2f(name, fx, fy)")
                        SetUniform(loc, array, 2);
 #endif
                }
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -983,7 +983,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform3f, "setUniform3f(name, fx,fy,fz) ")
                        SetUniform(loc, array, 3);
 #endif
                }
-               Py_Return;
+               Py_RETURN_NONE;
 
        }
        return NULL;
@@ -1008,7 +1008,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform4f, "setUniform4f(name, fx,fy,fz, fw) "
                        SetUniform(loc, array, 4);
 #endif
                }
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -1032,7 +1032,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform1i, "setUniform1i(name, ix)" )
                        SetUniform(loc, (int)value);
 #endif
                }
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -1056,7 +1056,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform2i , "setUniform2i(name, ix, iy)")
                        SetUniform(loc, array, 2);
 #endif
                }
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -1081,7 +1081,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform3i, "setUniform3i(name, ix,iy,iz) ")
                        SetUniform(loc, array, 3);
 #endif
                }
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -1104,7 +1104,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniform4i, "setUniform4i(name, ix,iy,iz, iw) "
                        SetUniform(loc, array, 4);
 #endif
                }
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -1144,7 +1144,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformfv , "setUniformfv( float (list2 or lis
 #else
                                                SetUniform(loc, array2, 2);                                             
 #endif
-                                               Py_Return;
+                                               Py_RETURN_NONE;
                                        } break;
                                case 3:
                                        {
@@ -1154,7 +1154,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformfv , "setUniformfv( float (list2 or lis
 #else
                                                SetUniform(loc, array3, 3);     
 #endif
-                                               Py_Return;
+                                               Py_RETURN_NONE;
                                        }break;
                                case 4:
                                        {
@@ -1164,7 +1164,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformfv , "setUniformfv( float (list2 or lis
 #else
                                                SetUniform(loc, array4, 4);     
 #endif
-                                               Py_Return;
+                                               Py_RETURN_NONE;
                                        }break;
                                default:
                                        {
@@ -1212,7 +1212,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformiv, "setUniformiv( int (list2 or list3
 #else
                                                SetUniform(loc, array2, 2);                                             
 #endif
-                                               Py_Return;
+                                               Py_RETURN_NONE;
                                        } break;
                                case 3:
                                        {
@@ -1223,7 +1223,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformiv, "setUniformiv( int (list2 or list3
 #else
                                                SetUniform(loc, array3, 3);     
 #endif
-                                               Py_Return;
+                                               Py_RETURN_NONE;
                                        }break;
                                case 4:
                                        {
@@ -1234,7 +1234,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformiv, "setUniformiv( int (list2 or list3
 #else
                                                SetUniform(loc, array4, 4);     
 #endif
-                                               Py_Return;
+                                               Py_RETURN_NONE;
                                        }break;
                                default:
                                        {
@@ -1282,7 +1282,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformMatrix4,
 #else
                                        SetUniform(loc,mat,(transp!=0));
 #endif
-                                       Py_Return;
+                                       Py_RETURN_NONE;
                                }
                        }
                }
@@ -1323,7 +1323,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformMatrix3,
 #else
                                        SetUniform(loc,mat,(transp!=0));
 #endif
-                                       Py_Return;
+                                       Py_RETURN_NONE;
 
                                }
                        }
@@ -1346,7 +1346,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setAttrib, "setAttrib(enum)" )
                mAttr=SHD_TANGENT;
                glUseProgramObjectARB(mShader);
                glBindAttribLocationARB(mShader, mAttr, "Tangent");
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -1376,7 +1376,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformDef, "setUniformDef(name, enum)" )
                        }
                        if(defined)
                        {
-                               Py_Return;
+                               Py_RETURN_NONE;
                        }
 
                        BL_DefUniform *uni = new BL_DefUniform();
@@ -1384,7 +1384,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformDef, "setUniformDef(name, enum)" )
                        uni->mType = nloc;
                        uni->mFlag = 0;
                        mPreDef.push_back(uni);
-                       Py_Return;
+                       Py_RETURN_NONE;
                }
        }
        return NULL;
index a332295..31f1d2d 100644 (file)
@@ -162,7 +162,7 @@ PyObject* KX_NetworkMessageActuator::PySetToPropName(
                return NULL;
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 // 2. SetSubject
@@ -180,7 +180,7 @@ PyObject* KX_NetworkMessageActuator::PySetSubject(
                return NULL;
        }
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 // 3. SetBodyType
@@ -198,7 +198,7 @@ PyObject* KX_NetworkMessageActuator::PySetBodyType(
                return NULL;
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 // 4. SetBody
@@ -216,6 +216,6 @@ PyObject* KX_NetworkMessageActuator::PySetBody(
                return NULL;
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
index 83148ea..5fa1992 100644 (file)
@@ -790,7 +790,7 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()")
                        spit("Fragment shaders not supported");
        
                mModified = true;
-               Py_Return;
+               Py_RETURN_NONE;
        }
 
        if( !GLEW_ARB_vertex_shader) {
@@ -798,14 +798,14 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()")
                        spit("Vertex shaders not supported");
 
                mModified = true;
-               Py_Return;
+               Py_RETURN_NONE;
        }
 
        if(!GLEW_ARB_shader_objects)  {
                if(!mModified)
                        spit("GLSL not supported");
                mModified = true;
-               Py_Return;
+               Py_RETURN_NONE;
        }
        else {
                // returns Py_None on error
@@ -838,7 +838,7 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()")
                                }
                        }
                }
-               Py_Return;
+               Py_RETURN_NONE;
        }
        PyErr_Format(PyExc_ValueError, "GLSL Error");
        return NULL;
@@ -910,7 +910,7 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, setBlending , "setBlending( GameLogic.sr
                        return NULL;
                }
                mUserDefBlend = true;
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
index 44d0731..7d238e2 100644 (file)
@@ -210,7 +210,7 @@ PyObject* KX_CDActuator::_getattr(const char *attr)
 PyObject* KX_CDActuator::PyStartCD(PyObject* self, PyObject* args, PyObject* kwds)
 {
        SND_CDObject::Instance()->SetPlaystate(SND_MUST_PLAY);
-       Py_Return;
+       Py_RETURN_NONE;
 }         
 
 
@@ -218,7 +218,7 @@ PyObject* KX_CDActuator::PyStartCD(PyObject* self, PyObject* args, PyObject* kwd
 PyObject* KX_CDActuator::PyPauseCD(PyObject* self, PyObject* args, PyObject* kwds)
 {
        SND_CDObject::Instance()->SetPlaystate(SND_MUST_PAUSE);
-       Py_Return;
+       Py_RETURN_NONE;
 } 
 
 
@@ -226,7 +226,7 @@ PyObject* KX_CDActuator::PyPauseCD(PyObject* self, PyObject* args, PyObject* kwd
 PyObject* KX_CDActuator::PyStopCD(PyObject* self, PyObject* args, PyObject* kwds)
 {
        SND_CDObject::Instance()->SetPlaystate(SND_MUST_STOP);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -239,7 +239,7 @@ PyObject* KX_CDActuator::PySetGain(PyObject* self, PyObject* args, PyObject* kwd
        
        SND_CDObject::Instance()->SetGain(gain);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }         
 
 
index 809bcdb..043070e 100644 (file)
@@ -812,7 +812,7 @@ KX_PYMETHODDEF_DOC(KX_Camera, setProjectionMatrix,
                if (PyMatTo(pymat, mat))
                {
                        SetProjectionMatrix(mat);
-                       Py_Return;
+                       Py_RETURN_NONE;
                }
        }
 
@@ -837,7 +837,7 @@ KX_PYMETHODDEF_DOC(KX_Camera, enableViewport,
                return NULL;
        }
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 KX_PYMETHODDEF_DOC(KX_Camera, setViewport,
@@ -851,7 +851,7 @@ KX_PYMETHODDEF_DOC(KX_Camera, setViewport,
        } else {
                return NULL;
        }
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 KX_PYMETHODDEF_DOC(KX_Camera, setOnTop,
@@ -863,5 +863,5 @@ KX_PYMETHODDEF_DOC(KX_Camera, setOnTop,
        scene = KX_GetActiveScene();
        MT_assert(scene);
        scene->SetCameraOnTop(this);
-       Py_Return;
+       Py_RETURN_NONE;
 }
index 9ff9c54..3e93745 100644 (file)
@@ -126,7 +126,7 @@ protected:
        void ExtractFrustumSphere();
 public:
 
-       typedef enum { INSIDE, INTERSECT, OUTSIDE } ;
+       enum { INSIDE, INTERSECT, OUTSIDE } ;
 
        KX_Camera(void* sgReplicationInfo,SG_Callbacks callbacks,const RAS_CameraData& camdata, bool frustum_culling = true, PyTypeObject *T = &Type);
        virtual ~KX_Camera();
index dc2c4c4..65f3aea 100644 (file)
@@ -530,7 +530,7 @@ PyObject* KX_CameraActuator::PySetMin(PyObject* self,
        if(PyArg_ParseTuple(args,"f", &min))
        {
                m_minHeight = min;
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -558,7 +558,7 @@ PyObject* KX_CameraActuator::PySetMax(PyObject* self,
        if(PyArg_ParseTuple(args,"f", &max))
        {
                m_maxHeight = max;
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -586,7 +586,7 @@ PyObject* KX_CameraActuator::PySetHeight(PyObject* self,
        if(PyArg_ParseTuple(args,"f", &height))
        {
                m_height = height;
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
@@ -604,7 +604,7 @@ PyObject* KX_CameraActuator::PySetXY(PyObject* self,
        if(PyArg_ParseTuple(args,"i", &value))
        {
                m_x = value != 0;
-               Py_Return;
+               Py_RETURN_NONE;
        }
        return NULL;
 }
index 5c08bdc..c0d802a 100644 (file)
@@ -633,7 +633,7 @@ PyObject* KX_ConstraintActuator::PySetDamp(PyObject* self,
        m_posDampTime = dampArg;
        if (m_posDampTime < 0) m_posDampTime = 0;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 3. getDamp                                                                */
 const char KX_ConstraintActuator::GetDamp_doc[] = 
@@ -660,7 +660,7 @@ PyObject* KX_ConstraintActuator::PySetRotDamp(PyObject* self,
        m_rotDampTime = dampArg;
        if (m_rotDampTime < 0) m_rotDampTime = 0;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 3. getRotDamp                                                                */
 const char KX_ConstraintActuator::GetRotDamp_doc[] = 
@@ -695,7 +695,7 @@ PyObject* KX_ConstraintActuator::PySetDirection(PyObject* self,
        }
        m_refDirection = dir/len;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 3. getDirection                                                                */
 const char KX_ConstraintActuator::GetDirection_doc[] = 
@@ -730,7 +730,7 @@ PyObject* KX_ConstraintActuator::PySetOption(PyObject* self,
        
        m_option = option;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 3. getOption                                                              */
 const char KX_ConstraintActuator::GetOption_doc[] = 
@@ -759,7 +759,7 @@ PyObject* KX_ConstraintActuator::PySetTime(PyObject* self,
                t = 0;
        m_activeTime = t;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 3. getTime                                                                */
 const char KX_ConstraintActuator::GetTime_doc[] = 
@@ -789,7 +789,7 @@ PyObject* KX_ConstraintActuator::PySetProperty(PyObject* self,
                m_property[sizeof(m_property)-1] = 0;
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 3. getProperty                                                                */
 const char KX_ConstraintActuator::GetProperty_doc[] = 
@@ -829,7 +829,7 @@ PyObject* KX_ConstraintActuator::PySetMin(PyObject* self,
                break;
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 5. getDistance                                                                 */
 const char KX_ConstraintActuator::GetDistance_doc[] = 
@@ -874,7 +874,7 @@ PyObject* KX_ConstraintActuator::PySetMax(PyObject* self,
                break;
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 7. getRayLength                                                                 */
 const char KX_ConstraintActuator::GetRayLength_doc[] = 
@@ -918,7 +918,7 @@ PyObject* KX_ConstraintActuator::PySetLimit(PyObject* self,
        
        if (IsValidMode((KX_CONSTRAINTTYPE)locrotArg)) m_locrot = locrotArg;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 9. getLimit                                                               */
 const char KX_ConstraintActuator::GetLimit_doc[] = 
index a8b4e0d..2387dcd 100644 (file)
@@ -270,7 +270,7 @@ PyObject* KX_GameActuator::PySetFile(PyObject* self, PyObject* args, PyObject* k
        
        m_filename = STR_String(new_file);
 
-       Py_Return;
+       Py_RETURN_NONE;
 
 }
        
index 521fd31..7d785f0 100644 (file)
@@ -521,7 +521,7 @@ KX_GameObject::UpdateMaterialData(
                        {
                                KX_BlenderMaterial *m =  static_cast<KX_BlenderMaterial*>(poly);
                                
-                               if (matname_hash == NULL)
+                               if (matname_hash == 0)
                                {
                                        m->UpdateIPO(rgba, specrgb,hard,spec,ref,emit, alpha);
                                        // if mesh has only one material attached to it then use original hack with no need to edit vertices (better performance)
index a67fbe5..ca84196 100644 (file)
@@ -503,7 +503,7 @@ PyObject* KX_IpoActuator::PySet(PyObject* self,
                ; /* error */
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* set property  ----------------------------------------------------------- */
@@ -523,7 +523,7 @@ PyObject* KX_IpoActuator::PySetProperty(PyObject* self,
 
        m_propname = propertyName;
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 4. setStart:                                                              */
@@ -541,7 +541,7 @@ PyObject* KX_IpoActuator::PySetStart(PyObject* self,
        
        m_startframe = startArg;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 5. getStart:                                                              */
 const char KX_IpoActuator::GetStart_doc[] = 
@@ -566,7 +566,7 @@ PyObject* KX_IpoActuator::PySetEnd(PyObject* self,
        
        m_endframe = endArg;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 7. getEnd:                                                                */
 const char KX_IpoActuator::GetEnd_doc[] = 
@@ -594,7 +594,7 @@ PyObject* KX_IpoActuator::PySetIpoAsForce(PyObject* self,
        if (m_ipo_as_force)
                m_ipo_add = false;
        
-       Py_Return;      
+       Py_RETURN_NONE; 
 }
 /* 7. getIpoAsForce:                                                         */
 const char KX_IpoActuator::GetIpoAsForce_doc[] = 
@@ -622,7 +622,7 @@ PyObject* KX_IpoActuator::PySetIpoAdd(PyObject* self,
        if (m_ipo_add)
                m_ipo_as_force = false;
        
-       Py_Return;      
+       Py_RETURN_NONE; 
 }
 /* 7. getIpoAsForce:                                                         */
 const char KX_IpoActuator::GetIpoAdd_doc[] = 
@@ -651,7 +651,7 @@ PyObject* KX_IpoActuator::PySetType(PyObject* self,
                m_type = (IpoActType) typeArg;
        }
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 9. getType:                                                               */
 const char KX_IpoActuator::GetType_doc[] = 
@@ -679,7 +679,7 @@ PyObject* KX_IpoActuator::PySetForceIpoActsLocal(PyObject* self,
 
        m_ipo_local = PyArgToBool(boolArg);
        
-       Py_Return;      
+       Py_RETURN_NONE; 
 }
 /* 11. getForceIpoActsLocal:                                                */
 const char KX_IpoActuator::GetForceIpoActsLocal_doc[] = 
index 3dd70cb..bd15d3c 100644 (file)
@@ -347,7 +347,7 @@ PyObject* KX_MouseFocusSensor::PyGetHitObject(PyObject* self,
        {
                return m_hitObject->AddRef();
        }
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
index e04f73a..9a62099 100644 (file)
@@ -365,7 +365,7 @@ PyObject* KX_ObjectActuator::PySetForce(PyObject* self,
        m_force.setValue(vecArg);
        m_bitLocalFlag.Force = PyArgToBool(bToggle);
        UpdateFuzzyFlags();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 4. getTorque                                                              */
@@ -394,7 +394,7 @@ PyObject* KX_ObjectActuator::PySetTorque(PyObject* self,
        m_torque.setValue(vecArg);
        m_bitLocalFlag.Torque = PyArgToBool(bToggle);
        UpdateFuzzyFlags();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 6. getDLoc                                                                */
@@ -423,7 +423,7 @@ PyObject* KX_ObjectActuator::PySetDLoc(PyObject* self,
        m_dloc.setValue(vecArg);
        m_bitLocalFlag.DLoc = PyArgToBool(bToggle);
        UpdateFuzzyFlags();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 8. getDRot                                                                */
@@ -452,7 +452,7 @@ PyObject* KX_ObjectActuator::PySetDRot(PyObject* self,
        m_drot.setValue(vecArg);
        m_bitLocalFlag.DRot = PyArgToBool(bToggle);
        UpdateFuzzyFlags();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 10. getLinearVelocity                                                 */
@@ -480,7 +480,7 @@ PyObject* KX_ObjectActuator::PySetLinearVelocity(PyObject* self,
        m_linear_velocity.setValue(vecArg);
        m_bitLocalFlag.LinearVelocity = PyArgToBool(bToggle);
        UpdateFuzzyFlags();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -508,7 +508,7 @@ PyObject* KX_ObjectActuator::PySetAngularVelocity(PyObject* self,
        m_angular_velocity.setValue(vecArg);
        m_bitLocalFlag.AngularVelocity = PyArgToBool(bToggle);
        UpdateFuzzyFlags();
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 13. setDamping                                                */
@@ -520,7 +520,7 @@ PyObject* KX_ObjectActuator::PySetDamping(PyObject* self,
                return NULL;
        }
        m_damping = damping;
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 13. getVelocityDamping                                                */
@@ -551,7 +551,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitX(PyObject* self,
        m_drot[0] = vecArg[0];
        m_dloc[0] = vecArg[1];
        m_bitLocalFlag.Torque = PyArgToBool(bToggle);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 6. getForceLimitY                                                                */
@@ -578,7 +578,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitY(PyObject* self,
        m_drot[1] = vecArg[0];
        m_dloc[1] = vecArg[1];
        m_bitLocalFlag.DLoc = PyArgToBool(bToggle);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 6. getForceLimitZ                                                                */
@@ -605,7 +605,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitZ(PyObject* self,
        m_drot[2] = vecArg[0];
        m_dloc[2] = vecArg[1];
        m_bitLocalFlag.DRot = PyArgToBool(bToggle);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* 4. getPID                                                              */
@@ -629,7 +629,7 @@ PyObject* KX_ObjectActuator::PySetPID(PyObject* self,
                return NULL;
        }
        m_torque.setValue(vecArg);
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
index 9c792a3..52c5b01 100644 (file)
@@ -204,15 +204,15 @@ PyParentObject KX_PolygonMaterial::Parents[] = {
 
 PyObject* KX_PolygonMaterial::_getattr(const char *attr)
 {
-       if (attr == "texture")
+       if (!strcmp(attr, "texture"))
                return PyString_FromString(m_texturename.ReadPtr());
-       if (attr == "material")
+       if (!strcmp(attr, "material"))
                return PyString_FromString(m_materialname.ReadPtr());
                
-       if (attr == "tface")
+       if (!strcmp(attr, "tface"))
                return PyCObject_FromVoidPtr(m_tface, NULL);
                
-       if (attr == "gl_texture")
+       if (!strcmp(attr, "gl_texture"))
        {
                Image *ima = m_tface->tpage;
                int bind = 0;
@@ -222,32 +222,32 @@ PyObject* KX_PolygonMaterial::_getattr(const char *attr)
                return PyInt_FromLong(bind);
        }
        
-       if (attr == "tile")
+       if (!strcmp(attr, "tile"))
                return PyInt_FromLong(m_tile);
-       if (attr == "tilexrep")
+       if (!strcmp(attr, "tilexrep"))
                return PyInt_FromLong(m_tilexrep);
-       if (attr == "tileyrep")
+       if (!strcmp(attr, "tileyrep"))
                return PyInt_FromLong(m_tileyrep);
        
-       if (attr == "drawingmode")
+       if (!strcmp(attr, "drawingmode"))
                return PyInt_FromLong(m_drawingmode);
-       if (attr == "transparent")
+       if (!strcmp(attr, "transparent"))
                return PyInt_FromLong(m_alpha);
-       if (attr == "zsort")
+       if (!strcmp(attr, "zsort"))
                return PyInt_FromLong(m_zsort);
-       if (attr == "lightlayer")
+       if (!strcmp(attr, "lightlayer"))
                return PyInt_FromLong(m_lightlayer);
-       if (attr == "triangle")
+       if (!strcmp(attr, "triangle"))
                // deprecated, triangle/quads shouldn't have been a material property
                return 0;
                
-       if (attr == "diffuse")
+       if (!strcmp(attr, "diffuse"))
                return PyObjectFrom(m_diffuse);
-       if (attr == "shininess")
+       if (!strcmp(attr, "shininess"))
                return PyFloat_FromDouble(m_shininess);
-       if (attr == "specular")
+       if (!strcmp(attr, "specular"))
                return PyObjectFrom(m_specular);
-       if (attr == "specularity")
+       if (!strcmp(attr, "specularity"))
                return PyFloat_FromDouble(m_specularity);
        
        _getattr_up(PyObjectPlus);
@@ -258,13 +258,13 @@ int KX_PolygonMaterial::_setattr(const char *attr, PyObject *pyvalue)
        if (PyFloat_Check(pyvalue))
        {
                float value = PyFloat_AsDouble(pyvalue);
-               if (attr == "shininess")
+               if (!strcmp(attr, "shininess"))
                {
                        m_shininess = value;
                        return 0;
                }
                
-               if (attr == "specularity")
+               if (!strcmp(attr, "specularity"))
                {
                        m_specularity = value;
                        return 0;
@@ -274,50 +274,50 @@ int KX_PolygonMaterial::_setattr(const char *attr, PyObject *pyvalue)
        if (PyInt_Check(pyvalue))
        {
                int value = PyInt_AsLong(pyvalue);
-               if (attr == "tile")
+               if (!strcmp(attr, "tile"))
                {
                        m_tile = value;
                        return 0;
                }
                
-               if (attr == "tilexrep")
+               if (!strcmp(attr, "tilexrep"))
                {
                        m_tilexrep = value;
                        return 0;
                }
                
-               if (attr == "tileyrep")
+               if (!strcmp(attr, "tileyrep"))
                {
                        m_tileyrep = value;
                        return 0;
                }
                
-               if (attr == "drawingmode")
+               if (!strcmp(attr, "drawingmode"))
                {
                        m_drawingmode = value;
                        return 0;
                }
                
-               if (attr == "transparent")
+               if (!strcmp(attr, "transparent"))
                {
                        m_alpha = value;
                        return 0;
                }
                
-               if (attr == "zsort")
+               if (!strcmp(attr, "zsort"))
                {
                        m_zsort = value;
                        return 0;
                }
                
-               if (attr == "lightlayer")
+               if (!strcmp(attr, "lightlayer"))
                {
                        m_lightlayer = value;
                        return 0;
                }
                
                // This probably won't work...
-               if (attr == "triangle")
+               if (!strcmp(attr, "triangle"))
                {
                        // deprecated, triangle/quads shouldn't have been a material property
                        return 0;
@@ -331,13 +331,13 @@ int KX_PolygonMaterial::_setattr(const char *attr, PyObject *pyvalue)
                        MT_Vector3 value;
                        if (PyVecTo(pyvalue, value))
                        {
-                               if (attr == "diffuse")
+                               if (!strcmp(attr, "diffuse"))
                                {
                                        m_diffuse = value;
                                        return 0;
                                }
                                
-                               if (attr == "specular")
+                               if (!strcmp(attr, "specular"))
                                {
                                        m_specular = value;
                                        return 0;
@@ -354,12 +354,12 @@ KX_PYMETHODDEF_DOC(KX_PolygonMaterial, setCustomMaterial, "setCustomMaterial(mat
        PyObject *material;
        if (PyArg_ParseTuple(args, "O", &material))
        {
-               if (m_pymaterial)
+               if (m_pymaterial) {
                        Py_DECREF(m_pymaterial);
-
+               }
                m_pymaterial = material;
                Py_INCREF(m_pymaterial);
-               Py_Return;
+               Py_RETURN_NONE;
        }
        
        return NULL;
@@ -375,7 +375,7 @@ KX_PYMETHODDEF_DOC(KX_PolygonMaterial, updateTexture, "updateTexture(tface, rast
                Image *ima = (Image*)tface->tpage;
                GPU_update_image_time(ima, rasty->GetTime());
 
-               Py_Return;
+               Py_RETURN_NONE;
        }
        
        return NULL;
@@ -388,7 +388,7 @@ KX_PYMETHODDEF_DOC(KX_PolygonMaterial, setTexture, "setTexture(tface)")
        {
                MTFace *tface = (MTFace*) PyCObject_AsVoidPtr(pytface);
                GPU_set_tpage(tface);
-               Py_Return;
+               Py_RETURN_NONE;
        }
        
        return NULL;
@@ -404,7 +404,7 @@ KX_PYMETHODDEF_DOC(KX_PolygonMaterial, activate, "activate(rasty, cachingInfo)")
                if (rasty && cachingInfo)
                {
                        DefaultActivate(rasty, *cachingInfo);
-                       Py_Return;
+                       Py_RETURN_NONE;
                }
        }
        
index 22611c4..b8ebce2 100644 (file)
@@ -353,7 +353,7 @@ PyObject* KX_RaySensor::PyGetHitObject(PyObject* self,
        {
                return m_hitObject->AddRef();
        }
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
index 4c331b2..017ab5d 100644 (file)
@@ -210,8 +210,7 @@ PyObject* KX_SCA_AddObjectActuator::_getattr(const char *attr)
        if (!strcmp(attr, "object")) {
                if (!m_OriginalObject)  Py_RETURN_NONE;
                else                                    return m_OriginalObject->AddRef();
-       }
-       else if (attr == "objectLastCreated") {
+       } else if (!strcmp(attr, "objectLastCreated")) {
                if (!m_OriginalObject)  Py_RETURN_NONE;
                else                                    return m_lastCreatedObject->AddRef();
        }
index e8d9a7f..1aba05c 100644 (file)
@@ -115,7 +115,7 @@ KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, setOperation,
                return NULL;
        }
        m_dyn_operation= dyn_operation;
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, getOperation,
index a5f49f9..8e33177 100644 (file)
@@ -295,7 +295,7 @@ PyObject* KX_SceneActuator::PySetUseRestart(PyObject* self,
        
        m_restart = boolArg != 0;
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -333,7 +333,7 @@ PyObject* KX_SceneActuator::PySetScene(PyObject* self,
        /* Scene switch is done by name. */
        m_nextSceneName = scene_name;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -368,7 +368,7 @@ PyObject* KX_SceneActuator::PySetCamera(PyObject* self,
                m_camera = (KX_Camera*) cam;
                if (m_camera)
                        m_camera->RegisterActuator(this);
-               Py_Return;
+               Py_RETURN_NONE;
        }
        PyErr_Clear();
 
@@ -388,7 +388,7 @@ PyObject* KX_SceneActuator::PySetCamera(PyObject* self,
                m_camera->RegisterActuator(this);
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
index ba60ea8..3760451 100644 (file)
@@ -302,7 +302,7 @@ PyObject* KX_SoundActuator::PySetFilename(PyObject* self, PyObject* args, PyObje
        if (!PyArg_ParseTuple(args, "s", &soundName))
                return NULL;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -332,7 +332,7 @@ PyObject* KX_SoundActuator::PyStartSound(PyObject* self, PyObject* args, PyObjec
                // To start the sound you must activate the actuator. 
                // This function is to restart the sound.
                m_soundObject->StartSound();    
-       Py_Return;
+       Py_RETURN_NONE;
 }         
 
 
@@ -342,7 +342,7 @@ PyObject* KX_SoundActuator::PyPauseSound(PyObject* self, PyObject* args, PyObjec
        if (m_soundObject)
                // unfortunately, openal does not implement pause correctly, it is equivalent to a stop
                m_soundObject->PauseSound();    
-       Py_Return;
+       Py_RETURN_NONE;
 } 
 
 
@@ -351,7 +351,7 @@ PyObject* KX_SoundActuator::PyStopSound(PyObject* self, PyObject* args, PyObject
 {
        if (m_soundObject)
                m_soundObject->StopSound();     
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -365,7 +365,7 @@ PyObject* KX_SoundActuator::PySetGain(PyObject* self, PyObject* args, PyObject*
        if (m_soundObject)
                m_soundObject->SetGain(gain);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }         
 
 
@@ -389,7 +389,7 @@ PyObject* KX_SoundActuator::PySetPitch(PyObject* self, PyObject* args, PyObject*
        if (m_soundObject)
                m_soundObject->SetPitch(pitch);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }         
 
 
@@ -413,7 +413,7 @@ PyObject* KX_SoundActuator::PySetRollOffFactor(PyObject* self, PyObject* args, P
        if (m_soundObject)
                m_soundObject->SetRollOffFactor(rollofffactor);
 
-       Py_Return;
+       Py_RETURN_NONE;
 }         
 
 
@@ -437,7 +437,7 @@ PyObject* KX_SoundActuator::PySetLooping(PyObject* self, PyObject* args, PyObjec
        if (m_soundObject)
                m_soundObject->SetLoopMode(looping);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }         
 
 
@@ -465,7 +465,7 @@ PyObject* KX_SoundActuator::PySetPosition(PyObject* self, PyObject* args, PyObje
        if (m_soundObject)
                m_soundObject->SetPosition(pos);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }         
 
 
@@ -483,7 +483,7 @@ PyObject* KX_SoundActuator::PySetVelocity(PyObject* self, PyObject* args, PyObje
        if (m_soundObject)
                m_soundObject->SetVelocity(vel);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }         
 
 
@@ -507,7 +507,7 @@ PyObject* KX_SoundActuator::PySetOrientation(PyObject* self, PyObject* args, PyO
        if (m_soundObject)
                m_soundObject->SetOrientation(ori);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 PyObject* KX_SoundActuator::PySetType(PyObject* self, PyObject* args, PyObject* kwds)
@@ -523,7 +523,7 @@ PyObject* KX_SoundActuator::PySetType(PyObject* self, PyObject* args, PyObject*
                m_type = (KX_SOUNDACT_TYPE) typeArg;
        }
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 PyObject* KX_SoundActuator::PyGetType(PyObject* self, PyObject* args, PyObject* kwds)
index 7237d6c..cd5c5d2 100644 (file)
@@ -173,7 +173,7 @@ KX_StateActuator::PySetOperation(PyObject* self,
 
        m_operation = oper;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* set mask ---------------------------------------------------------- */
@@ -198,7 +198,7 @@ KX_StateActuator::PySetMask(PyObject* self,
 
        m_mask = mask;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
index 6528ec4..117adb4 100644 (file)
@@ -291,7 +291,7 @@ PyObject* KX_TouchSensor::PySetProperty(PyObject* self,
        }
        prop->Release();
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 /* 2. getProperty */
 const char KX_TouchSensor::GetProperty_doc[] = 
@@ -318,7 +318,7 @@ PyObject* KX_TouchSensor::PyGetHitObject(PyObject* self,
        {
                return m_hitObject->AddRef();
        }
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 const char KX_TouchSensor::GetHitObjectList_doc[] = 
@@ -402,7 +402,7 @@ PyObject* KX_TouchSensor::PySetTouchMaterial(PyObject* self, PyObject* args, PyO
        
        m_bFindMaterial = pulseArg != 0;
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
index f9f804c..89dfc8e 100644 (file)
@@ -480,9 +480,8 @@ PyObject* KX_TrackToActuator::_getattr(const char *attr)
        _getattr_up(SCA_IActuator);
 }
 
-int KX_TrackToActuator::_setattr(const char *attr, PyObject* value) {
-       int ret;
-       
+int KX_TrackToActuator::_setattr(const char *attr, PyObject* value)
+{
        if (!strcmp(attr, "object")) {
                KX_GameObject *gameobj;
                
@@ -570,7 +569,7 @@ PyObject* KX_TrackToActuator::PySetTime(PyObject* self, PyObject* args, PyObject
        
        m_time= timeArg;
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
@@ -614,7 +613,7 @@ PyObject* KX_TrackToActuator::PySetUse3D(PyObject* self, PyObject* args, PyObjec
        
        m_allow3D = !(boolArg == 0);
        
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 /* eof */
index eddd110..ab102ee 100644 (file)
@@ -328,7 +328,7 @@ PyObject* KX_VertexProxy::PySetXYZ(PyObject*,
        {
                m_vertex->SetXYZ(vec);
                m_mesh->SetMeshModified(true);
-               Py_Return;
+               Py_RETURN_NONE;
        }
        
        return NULL;
@@ -350,7 +350,7 @@ PyObject* KX_VertexProxy::PySetNormal(PyObject*,
        {
                m_vertex->SetNormal(vec);
                m_mesh->SetMeshModified(true);
-               Py_Return;
+               Py_RETURN_NONE;
        }
        
        return NULL;
@@ -374,7 +374,7 @@ PyObject* KX_VertexProxy::PySetRGBA(PyObject*,
        {
                m_vertex->SetRGBA(MT_Vector4(r, g, b, a));
                m_mesh->SetMeshModified(true);
-               Py_Return;
+               Py_RETURN_NONE;
        }
        PyErr_Clear();
        
@@ -383,7 +383,7 @@ PyObject* KX_VertexProxy::PySetRGBA(PyObject*,
        {
                m_vertex->SetRGBA(rgba);
                m_mesh->SetMeshModified(true);
-               Py_Return;
+               Py_RETURN_NONE;
        }
        
        return NULL;
@@ -406,7 +406,7 @@ PyObject* KX_VertexProxy::PySetUV(PyObject*,
        {
                m_vertex->SetUV(vec);
                m_mesh->SetMeshModified(true);
-               Py_Return;
+               Py_RETURN_NONE;
        }
        
        return NULL;
@@ -434,7 +434,7 @@ PyObject* KX_VertexProxy::PySetUV2(PyObject*,
                        m_vertex->SetUnit(unit);
                        m_vertex->SetUV2(vec);
                        m_mesh->SetMeshModified(true);
-                       Py_Return;
+                       Py_RETURN_NONE;
                }
        }
        return NULL;
index 0a4aaa0..ca89a63 100644 (file)
@@ -152,7 +152,7 @@ KX_VisibilityActuator::PySetVisible(PyObject* self,
 
        m_visible = PyArgToBool(vis);
 
-       Py_Return;
+       Py_RETURN_NONE;
 }
 
 
index 2326bde..3d8eef2 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "SM_Object.h"
 
-typedef enum
+enum
 {
        FH_RESPONSE,
        SENSOR_RESPONSE,                /* Touch Sensors */
index 0912626..c5cf92b 100644 (file)
@@ -36,7 +36,7 @@ struct        PHY__Vector3
 };
 //typedef      float   PHY__Vector3[4];
 
-typedef enum
+enum
 {
        PHY_FH_RESPONSE,
        PHY_SENSOR_RESPONSE,    /* Touch Sensors */