[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19072] trunk/blender/source/gameengine: * removed typedefs that were not used (from anonymous enums and structs)
Campbell Barton
ideasman42 at gmail.com
Sat Feb 21 13:43:35 CET 2009
Revision: 19072
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19072
Author: campbellbarton
Date: 2009-02-21 13:43:24 +0100 (Sat, 21 Feb 2009)
Log Message:
-----------
* removed typedefs that were not used (from anonymous enums and structs)
* 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
Modified Paths:
--------------
trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
trunk/blender/source/gameengine/Expressions/ListValue.cpp
trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
trunk/blender/source/gameengine/Expressions/PyObjectPlus.h
trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_DelaySensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_MouseSensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp
trunk/blender/source/gameengine/GameLogic/SCA_RandomSensor.cpp
trunk/blender/source/gameengine/Ketsji/BL_Shader.cpp
trunk/blender/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
trunk/blender/source/gameengine/Ketsji/KX_CDActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_Camera.cpp
trunk/blender/source/gameengine/Ketsji/KX_Camera.h
trunk/blender/source/gameengine/Ketsji/KX_CameraActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_GameActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
trunk/blender/source/gameengine/Ketsji/KX_IpoActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
trunk/blender/source/gameengine/Ketsji/KX_ObjectActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
trunk/blender/source/gameengine/Ketsji/KX_RaySensor.cpp
trunk/blender/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_SceneActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_StateActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_TouchSensor.cpp
trunk/blender/source/gameengine/Ketsji/KX_TrackToActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_VertexProxy.cpp
trunk/blender/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
trunk/blender/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
trunk/blender/source/gameengine/Physics/common/PHY_DynamicTypes.h
Modified: trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -911,6 +911,6 @@
printf("Invalid type for action actuator: %d\n", typeArg); /* error */
}
- Py_Return;
+ Py_RETURN_NONE;
}
Modified: trunk/blender/source/gameengine/Expressions/ListValue.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/ListValue.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/Expressions/ListValue.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -429,7 +429,7 @@
{
std::reverse(m_pValueArray.begin(),m_pValueArray.end());
- Py_Return;
+ Py_RETURN_NONE;
}
Modified: trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -697,7 +697,6 @@
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;
Modified: trunk/blender/source/gameengine/Expressions/PyObjectPlus.h
===================================================================
--- trunk/blender/source/gameengine/Expressions/PyObjectPlus.h 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/Expressions/PyObjectPlus.h 2009-02-21 12:43:24 UTC (rev 19072)
@@ -72,9 +72,6 @@
#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 @@
// 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);
}
};
Modified: trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -221,7 +221,7 @@
} else {
; /* error: bad actuator name */
}
- Py_Return;
+ Py_RETURN_NONE;
}
/* eof */
Modified: trunk/blender/source/gameengine/GameLogic/SCA_DelaySensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_DelaySensor.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/GameLogic/SCA_DelaySensor.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -211,7 +211,7 @@
return NULL;
}
m_delay = delay;
- Py_Return;
+ Py_RETURN_NONE;
}
const char SCA_DelaySensor::SetDuration_doc[] =
@@ -233,7 +233,7 @@
return NULL;
}
m_duration = duration;
- Py_Return;
+ Py_RETURN_NONE;
}
const char SCA_DelaySensor::SetRepeat_doc[] =
@@ -250,7 +250,7 @@
return NULL;
}
m_repeat = (repeat != 0);
- Py_Return;
+ Py_RETURN_NONE;
}
const char SCA_DelaySensor::GetDelay_doc[] =
Modified: trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -324,7 +324,7 @@
m_Execute_Ueber_Priority = priority;
- Py_Return;
+ Py_RETURN_NONE;
}
Modified: trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -264,7 +264,7 @@
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 @@
};
m_pulse_frequency = pulse_frequencyArg;
- Py_Return;
+ Py_RETURN_NONE;
}
@@ -326,7 +326,7 @@
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 @@
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 @@
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 @@
"\tThe sensor is put in its initial state as if it was just activated.\n")
{
Init();
- Py_Return;
+ Py_RETURN_NONE;
}
/* ----------------------------------------------- */
Modified: trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -577,7 +577,7 @@
/* 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 @@
/* 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 @@
/* anything. It's up to the user to provide a sensible number. */
m_qual2 = keyCode;
- Py_Return;
+ Py_RETURN_NONE;
}
@@ -682,7 +682,7 @@
if (index>0) return resultlist;
}
- Py_Return;
+ Py_RETURN_NONE;
}
@@ -725,7 +725,7 @@
if (index > 0) return resultlist;
}
- Py_Return;
+ Py_RETURN_NONE;
}
//<---- Deprecated
@@ -770,7 +770,7 @@
return PyInt_FromLong(inevent.m_status);
}
- Py_Return;
+ Py_RETURN_NONE;
}
/* ------------------------------------------------------------------------- */
Modified: trunk/blender/source/gameengine/GameLogic/SCA_MouseSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_MouseSensor.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/GameLogic/SCA_MouseSensor.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -292,7 +292,7 @@
return PyInt_FromLong(event.m_status);
}
- Py_Return;
+ Py_RETURN_NONE;
}
/* ------------------------------------------------------------------------- */
Modified: trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -298,7 +298,7 @@
}
prop->Release();
- Py_Return;
+ Py_RETURN_NONE;
}
/* 2. getProperty */
@@ -328,7 +328,7 @@
if (valArg) m_exprtxt = valArg;
- Py_Return;
+ Py_RETURN_NONE;
}
/* 4. getValue */
Modified: trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -397,7 +397,7 @@
m_checktype = typeArg;
}
- Py_Return;
+ Py_RETURN_NONE;
}
/* 3. getProperty */
@@ -434,7 +434,7 @@
; /* error: bad property name */
}
prop->Release();
- Py_Return;
+ Py_RETURN_NONE;
}
/* 5. getValue */
@@ -470,7 +470,7 @@
m_checkpropval = oldval;
return NULL;
}
- Py_Return;
+ Py_RETURN_NONE;
}
/* eof */
Modified: trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp 2009-02-21 12:15:57 UTC (rev 19071)
+++ trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp 2009-02-21 12:43:24 UTC (rev 19072)
@@ -413,7 +413,7 @@
m_base->SetSeed(seedArg);
- Py_Return;
+ Py_RETURN_NONE;
}
/* 2. getSeed */
const char SCA_RandomActuator::GetSeed_doc[] =
@@ -478,7 +478,7 @@
}
prop->Release();
- Py_Return;
+ Py_RETURN_NONE;
}
/* 10. getProperty */
const char SCA_RandomActuator::GetProperty_doc[] =
@@ -506,7 +506,7 @@
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 @@
/* 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 @@
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 @@
m_distribution = KX_RANDOMACT_INT_CONST;
m_parameter1 = paraArg;
enforceConstraints();
- Py_Return;
+ Py_RETURN_NONE;
}
/* 15. setIntUniform,*/
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list