Changed Python _getattr/_setattr methods to use const STR_String& instead of char...
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Sun, 16 May 2004 13:05:15 +0000 (13:05 +0000)
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Sun, 16 May 2004 13:05:15 +0000 (13:05 +0000)
84 files changed:
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_ActionActuator.h
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Expressions/ListValue.h
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/Expressions/Value.cpp
source/gameengine/Expressions/Value.h
source/gameengine/GameLogic/SCA_ANDController.cpp
source/gameengine/GameLogic/SCA_ANDController.h
source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
source/gameengine/GameLogic/SCA_AlwaysSensor.h
source/gameengine/GameLogic/SCA_ExpressionController.h
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.h
source/gameengine/GameLogic/SCA_IObject.cpp
source/gameengine/GameLogic/SCA_IObject.h
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_ISensor.h
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GameLogic/SCA_KeyboardSensor.h
source/gameengine/GameLogic/SCA_MouseSensor.cpp
source/gameengine/GameLogic/SCA_MouseSensor.h
source/gameengine/GameLogic/SCA_ORController.cpp
source/gameengine/GameLogic/SCA_ORController.h
source/gameengine/GameLogic/SCA_PropertyActuator.cpp
source/gameengine/GameLogic/SCA_PropertyActuator.h
source/gameengine/GameLogic/SCA_PropertySensor.cpp
source/gameengine/GameLogic/SCA_PropertySensor.h
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GameLogic/SCA_PythonController.h
source/gameengine/GameLogic/SCA_RandomActuator.cpp
source/gameengine/GameLogic/SCA_RandomActuator.h
source/gameengine/GameLogic/SCA_RandomSensor.cpp
source/gameengine/GameLogic/SCA_RandomSensor.h
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
source/gameengine/Ketsji/KX_CDActuator.cpp
source/gameengine/Ketsji/KX_CDActuator.h
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_CameraActuator.h
source/gameengine/Ketsji/KX_ConstraintActuator.cpp
source/gameengine/Ketsji/KX_ConstraintActuator.h
source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
source/gameengine/Ketsji/KX_ConstraintWrapper.h
source/gameengine/Ketsji/KX_GameActuator.cpp
source/gameengine/Ketsji/KX_GameActuator.h
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IpoActuator.cpp
source/gameengine/Ketsji/KX_IpoActuator.h
source/gameengine/Ketsji/KX_MeshProxy.cpp
source/gameengine/Ketsji/KX_MeshProxy.h
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.h
source/gameengine/Ketsji/KX_NearSensor.cpp
source/gameengine/Ketsji/KX_NearSensor.h
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_ObjectActuator.h
source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h
source/gameengine/Ketsji/KX_RadarSensor.cpp
source/gameengine/Ketsji/KX_RadarSensor.h
source/gameengine/Ketsji/KX_RaySensor.cpp
source/gameengine/Ketsji/KX_RaySensor.h
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
source/gameengine/Ketsji/KX_SceneActuator.cpp
source/gameengine/Ketsji/KX_SceneActuator.h
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_SoundActuator.h
source/gameengine/Ketsji/KX_TouchSensor.cpp
source/gameengine/Ketsji/KX_TouchSensor.h
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_TrackToActuator.h
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Ketsji/KX_VertexProxy.h
source/gameengine/Ketsji/KX_VisibilityActuator.cpp
source/gameengine/Ketsji/KX_VisibilityActuator.h

index 59d7ce16361de688124db225ef323d2b14766447..3f633eec9d67b8c9ccdba6caf628ba255e9b992e 100644 (file)
@@ -399,7 +399,7 @@ PyMethodDef BL_ActionActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* BL_ActionActuator::_getattr(char* attr) {
+PyObject* BL_ActionActuator::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IActuator);
 }
 
index e3708bc6832cfba115555459c02dc53500550e7b..9e8054bff815de542c0dfea98704cf128d1d7388 100644 (file)
@@ -95,7 +95,7 @@ public:
 //     KX_PYMETHOD(BL_ActionActuator,GetChannel);
 
 
-       virtual PyObject* _getattr(char* attr);
+       virtual PyObject* _getattr(const STR_String& attr);
        void SetBlendTime (float newtime);
 
 protected:
index 380befa51bd187689d660624058a348b008d2b74..6984e5663db18dab384056ca9a31d85c0ec30534 100644 (file)
@@ -205,7 +205,7 @@ PyMethodDef CListValue::Methods[] = {
 
 
 
-PyObject* CListValue::_getattr(char* attr) {
+PyObject* CListValue::_getattr(const STR_String& attr) {
        _getattr_up(CValue);
 }
 
index 10c64a13177695600268b1c483f6439b4ac2ffa8..431f8f558a940d94e41b80434d712359cf4d1098 100644 (file)
@@ -59,7 +59,7 @@ public:
 
        bool CheckEqual(CValue* first,CValue* second);
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        KX_PYMETHOD(CListValue,append);
        KX_PYMETHOD(CListValue,reverse);
index f9801fe0f60288b437c482cb403e198daf4cea85..74468cf030d22f53e9aa86e6485e947a80b65ee3 100644 (file)
@@ -100,15 +100,15 @@ PyParentObject PyObjectPlus::Parents[] = {&PyObjectPlus::Type, NULL};
 /*------------------------------
  * PyObjectPlus attributes     -- attributes
 ------------------------------*/
-PyObject *PyObjectPlus::_getattr(char *attr)
+PyObject *PyObjectPlus::_getattr(const STR_String& attr)
 {
   //if (streq(attr, "type"))
   //  return Py_BuildValue("s", (*(GetParents()))->tp_name);
 
-  return Py_FindMethod(Methods, this, attr);    
+  return Py_FindMethod(Methods, this, const_cast<char *>(attr.ReadPtr()));
 }
 
-int PyObjectPlus::_setattr(char *attr, PyObject *value)
+int PyObjectPlus::_setattr(const STR_String& attr, PyObject *value)
 {
        //return PyObject::_setattr(attr,value);
        //cerr << "Unknown attribute" << endl;
index 40d8ffb590352c11f4f2a58793afe197fc18460a..7c5f531f35b336b77778f053ae9c9f7d6f747b30 100644 (file)
@@ -40,6 +40,7 @@
 #endif
 
 #include "KX_Python.h"
+#include "STR_String.h"
 
 /*------------------------------
  * Python defines
@@ -72,7 +73,7 @@ inline void Py_Fatal(char *M) {
                                                                // which allows attribute and method calls
                                                                // to be properly passed up the hierarchy.
 #define _getattr_up(Parent) \
-  PyObject *rvalue = Py_FindMethod(Methods, this, attr); \
+  PyObject *rvalue = Py_FindMethod(Methods, this, const_cast<char*>(attr.ReadPtr())); \
   if (rvalue == NULL) \
     { \
       PyErr_Clear(); \
@@ -107,15 +108,15 @@ class PyObjectPlus : public PyObject {                            // The PyObjectPlus abstract class
 //       Py_DECREF(this);
 //  };                         // decref method
 
-  virtual PyObject *_getattr(char *attr);                      // _getattr method
+  virtual PyObject *_getattr(const STR_String& attr);                  // _getattr method
   static  PyObject *__getattr(PyObject * PyObj, char *attr)    // This should be the entry in Type. 
-    { return ((PyObjectPlus*) PyObj)->_getattr(attr); };
+    { return ((PyObjectPlus*) PyObj)->_getattr(STR_String(attr)); };
    
-  virtual int _setattr(char *attr, PyObject *value);           // _setattr method
+  virtual int _setattr(const STR_String& attr, PyObject *value);               // _setattr method
   static  int __setattr(PyObject *PyObj,                       // This should be the entry in Type. 
                        char *attr, 
                        PyObject *value)
-    { return ((PyObjectPlus*) PyObj)->_setattr(attr, value);  };
+    { return ((PyObjectPlus*) PyObj)->_setattr(STR_String(attr), value);  };
 
   virtual PyObject *_repr(void);                               // _repr method
   static  PyObject *__repr(PyObject *PyObj)                    // This should be the entry in Type.
index 58f07790f6aa8fb8c4fc9c4a4b5ceb99cdb81390..55dd1f5c1ddca785732dc5932ea290b9fe91ae52 100644 (file)
@@ -609,7 +609,7 @@ static PyMethodDef  CValueMethods[] =
 };
 
 
-PyObject*      CValue::_getattr(char* attr)
+PyObject*      CValue::_getattr(const STR_String& attr)
 {
        CValue* resultattr = FindIdentifier(attr);
        STR_String text;
@@ -698,7 +698,7 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj)
        return vallie;
 
 }
-int    CValue::_setattr(char* attr,PyObject* pyobj)
+int    CValue::_setattr(const STR_String& attr,PyObject* pyobj)
 {
        
        if (!pyobj) { // member deletion
index 527dfa85d39c4aac69a2b33fa553730e68a7ea15..4656e2ca5ac3e3cb8eca6fc543ecc4322b061379 100644 (file)
@@ -200,6 +200,20 @@ public:
     static char method_name##_doc[]; \
 
 /* The line above should remain empty */
+/**
+ * Method table macro (with doc)
+ */
+#define KX_PYMETHODTABLE(class_name, method_name) \
+       {#method_name , (PyCFunction) class_name::sPy##method_name, METH_VARARGS, class_name::method_name##_doc}
+
+/**
+ * Function implementation macro
+ */
+#define KX_PYMETHODDEF_DOC(class_name, method_name, doc_string) \
+char class_name::method_name##_doc[] = doc_string; \
+PyObject* class_name::Py##method_name(PyObject* self, PyObject* args, PyObject* kwds)
+
+
 
 #ifndef NO_EXP_PYTHON_EMBEDDING
 #include "PyObjectPlus.h"
@@ -239,7 +253,7 @@ public:
 
 
 
-       PyObject*                       _getattr(char* attr);
+       virtual PyObject*                       _getattr(const STR_String& attr);
 
        void    SpecialRelease()
        {
@@ -266,7 +280,7 @@ public:
        virtual CValue* ConvertPythonToValue(PyObject* pyobj);
 
 
-       int                                     _setattr(char* attr,PyObject* value);
+       virtual int                             _setattr(const STR_String& attr,PyObject* value);
        
        KX_PYMETHOD(CValue,GetName);
 
index 4064bb6c8405b4a5e7ca141dadd4de526d690753..0daba011c7115d17bf62653fffc38617841b523a 100644 (file)
@@ -140,7 +140,7 @@ PyMethodDef SCA_ANDController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* SCA_ANDController::_getattr(char* attr) {
+PyObject* SCA_ANDController::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IController);
 }
 
index f3064e931f26e65b8e15e9f24c5a3f043735cecd..d32bfd2aa48bd49adaf6c389d1cd1697a6f4e407 100644 (file)
@@ -51,7 +51,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
 };
 
index 1ca8545b062cf091a998420a7482c7db9fbf33b8..a0bb7311eb9042a400ca53bcc8a51b06a278c893 100644 (file)
@@ -135,7 +135,7 @@ PyMethodDef SCA_AlwaysSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* SCA_AlwaysSensor::_getattr(char* attr) {
+PyObject* SCA_AlwaysSensor::_getattr(const STR_String& attr) {
        _getattr_up(SCA_ISensor);
 }
 
index 03568bf1578d77a70025c9a05f5e28cf0b4b93f8..456516fa9896f4150e623ce08efcae663934f2ab 100644 (file)
@@ -53,7 +53,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
        
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        
 };
index a92f7e2e08822caa8c7ea50b5724a304a532b7b9..e77f2b9938b5f3733431e3258f1d6e0e58e50b89 100644 (file)
@@ -56,7 +56,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-//     virtual PyObject*  _getattr(char *attr);
+//     virtual PyObject* _getattr(const STR_String& attr);
 
 };
 
index 38fc75d7ad9dfc9dbfb7df394080661e8d045ce0..422f6d9cf0d3d224dd631115b51d57bed6a1d03c 100644 (file)
@@ -254,7 +254,7 @@ PyMethodDef SCA_ILogicBrick::Methods[] = {
 
 
 PyObject*
-SCA_ILogicBrick::_getattr(char* attr)
+SCA_ILogicBrick::_getattr(const STR_String& attr)
 {
   _getattr_up(CValue);
 }
index 04d4da7c8ce0a06f8b5591b5f19c335e06a40335..5199f66f409426e2c5823b62e796a10aeee9782a 100644 (file)
@@ -78,7 +78,7 @@ public:
 
        virtual bool            LessComparedTo(SCA_ILogicBrick* other);
        
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        static class SCA_LogicManager*  m_sCurrentLogicManager;
 
index 47a81f358965400adba13ee9e50e72d5dfdcd2ee..bd356f07cb93a863b221538a5e088e42068e3efe 100644 (file)
@@ -360,7 +360,7 @@ PyMethodDef SCA_IObject::Methods[] = {
 
 
 
-PyObject* SCA_IObject::_getattr(char* attr) {
+PyObject* SCA_IObject::_getattr(const STR_String& attr) {
        _getattr_up(CValue);
 }
 
index f1409871de8ebe3dd53480c18afe4ec7dfc1e323..b1bb013abea5a5d3472e43834ed91b4fa4d3d3bf 100644 (file)
@@ -114,7 +114,7 @@ public:
        const class MT_Point3&  ConvertPythonVectorArg(PyObject* args);
        
        // here come the python forwarded methods
-       PyObject* _getattr(char* attr);
+       virtual PyObject* _getattr(const STR_String& attr);
        
 };
 
index 613a44b09f30d9e5de3632fb09713fd3dabc3560..43dd6bef83ec176a23c8ea7e7ab92ce201e3d23c 100644 (file)
@@ -165,7 +165,7 @@ PyMethodDef SCA_ISensor::Methods[] = {
 
 
 PyObject*
-SCA_ISensor::_getattr(char* attr)
+SCA_ISensor::_getattr(const STR_String& attr)
 {
   _getattr_up(SCA_ILogicBrick);
 }
index c0804cc757e0615d9f3ca3392b5d50202201cae6..fb2dca97d06ee551334080beef002f97f3f521fb 100644 (file)
@@ -46,7 +46,7 @@ class SCA_ISensor : public SCA_ILogicBrick
        class SCA_EventManager* m_eventmgr;
        bool    m_triggered;
 
-       /* Pulse positive  pulses? */
+       /** Pulse positive  pulses? */
        bool m_pos_pulsemode;
 
        /** Pulse negative pulses? */
@@ -61,7 +61,7 @@ class SCA_ISensor : public SCA_ILogicBrick
        /** Number of ticks since the last negative pulse. */
        int m_neg_ticks;
 
-       /* invert the output signal*/
+       /** invert the output signal*/
        bool m_invert;
 
        /** Sensor must ignore updates? */
@@ -77,7 +77,7 @@ public:
        ~SCA_ISensor();
        virtual void    ReParent(SCA_IObject* parent);
 
-       /* Because we want sensors to share some behaviour, the Activate has     */
+       /** Because we want sensors to share some behaviour, the Activate has     */
        /* an implementation on this level. It requires an evaluate on the lower */
        /* level of individual sensors. Mapping the old activate()s is easy.     */
        /* The IsPosTrig() also has to change, to keep things consistent.        */
@@ -85,7 +85,7 @@ public:
        virtual bool Evaluate(CValue* event) = 0;
        virtual bool IsPositiveTrigger();
        
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
        virtual CValue* GetReplica()=0;
 
        /** Set parameters for the pulsing behaviour.
index d31e2ae92004e1124712184b6b94592c01193e9b..1eee83ad3d61e180b385d5a56cbac833260d9aad 100644 (file)
@@ -670,7 +670,7 @@ PyMethodDef SCA_KeyboardSensor::Methods[] = {
 };
 
 PyObject*
-SCA_KeyboardSensor::_getattr(char* attr)
+SCA_KeyboardSensor::_getattr(const STR_String& attr)
 {
   _getattr_up(SCA_ISensor);
 }
index 2badc79920622eec257cd5f1d80367a655279676..f4a3d7e47b56ef1a02557dcc64575956cdefd72c 100644 (file)
@@ -127,7 +127,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
 
        PyObject* PySetAllMode(PyObject* self, 
index 08cf68ba332801eb83bc429d44da993697d37782..fda641cfc96b2522295a68e461d764c8b10e651e 100644 (file)
@@ -254,7 +254,7 @@ PyMethodDef SCA_MouseSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* SCA_MouseSensor::_getattr(char* attr) {
+PyObject* SCA_MouseSensor::_getattr(const STR_String& attr) {
        _getattr_up(SCA_ISensor);
 }
 
index 9b8043a1f156d1589990500df83484e87c6ea42b..e8a0d0db78b6020d6f40d074f2eb88ce29199573 100644 (file)
@@ -110,7 +110,7 @@ class SCA_MouseSensor : public SCA_ISensor
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        /* read x-coordinate */
        KX_PYMETHOD_DOC(SCA_MouseSensor,GetXPosition);
index 773b66be6373872215a1848a5aea3412cf32ff2e..29f62b4e6a7f2bb103b444733f6a3a7a1bf35012 100644 (file)
@@ -132,7 +132,7 @@ PyMethodDef SCA_ORController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* SCA_ORController::_getattr(char* attr) {
+PyObject* SCA_ORController::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IController);
 }
 
index e88beb224928e9c911666e243f3d3c95fccad32f..d8b844d9063d51130256cf148ac3aff027ada76d 100644 (file)
@@ -52,7 +52,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 };
 
 #endif //__KX_ORCONTROLLER
index e4820e00f70ed24809a4d6d305512ea4e36b9305..c416d8e1dd5560d0a02dc7a205d6286980ed63fa 100644 (file)
@@ -219,7 +219,7 @@ PyMethodDef SCA_PropertyActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* SCA_PropertyActuator::_getattr(char* attr) {
+PyObject* SCA_PropertyActuator::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IActuator);
 }
 
index 5f7fcf9e87ff9cd9a6a15cf42ece0fdb509fe5cf..2fdf1a62559680885b0afd6cf2d5e3faaa38653f 100644 (file)
@@ -102,7 +102,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       PyObject*  _getattr(char *attr);
+       virtual PyObject*  _getattr(const STR_String& attr);
 
        // python wrapped methods
        KX_PYMETHOD_DOC(SCA_PropertyActuator,SetProperty);
index 448de10738182b55cb618ce0250033104f9ac436..6f98b777d8c46a1681fdc782d2b205df4df8f8ae 100644 (file)
@@ -318,7 +318,7 @@ PyMethodDef SCA_PropertySensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* SCA_PropertySensor::_getattr(char* attr) {
+PyObject* SCA_PropertySensor::_getattr(const STR_String& attr) {
        _getattr_up(SCA_ISensor); /* implicit return! */
 }
 
index 37f4138c6fc9f55960d1aa0402058e8e78f6c917..0ebcacdb21a539a4d27be18f2c0ed7c203b0d154 100644 (file)
@@ -90,7 +90,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        /* 1. getType */
        KX_PYMETHOD_DOC(SCA_PropertySensor,GetType);
index a96e17e67d280558eff5ed89531833c4f52ffe86..e21916e060e848c0d265cda3d51a74e23845b445 100644 (file)
@@ -274,7 +274,7 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
 
 
 
-PyObject* SCA_PythonController::_getattr(char* attr)
+PyObject* SCA_PythonController::_getattr(const STR_String& attr)
 {
        _getattr_up(SCA_IController);
 }
index f19fcac72f36479af93738564ebc336d7a6e7fcd..574bf35be7ec8669a8352bfd682288b4900e7a02 100644 (file)
@@ -72,7 +72,7 @@ class SCA_PythonController : public SCA_IController
        static PyObject* sPyAddActiveActuator(PyObject* self, 
                                                                                  PyObject* args, 
                                                                                  PyObject* kwds);
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        KX_PYMETHOD_DOC(SCA_PythonController,GetSensors);
        KX_PYMETHOD_DOC(SCA_PythonController,GetSensor);
index 4347e5cef6767a1b57ee876d16fc786973583bbe..4bc0e2539f014a4de28ac9cc0ef15f80bea43951 100644 (file)
@@ -360,7 +360,7 @@ PyMethodDef SCA_RandomActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* SCA_RandomActuator::_getattr(char* attr) {
+PyObject* SCA_RandomActuator::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IActuator);
 }
 
index 9045dad078c0aad4230946fe1a8f3d6116097c81..1048790c9b6e11f0d21ca81416d1f01b0f0d847b 100644 (file)
@@ -99,7 +99,7 @@ class SCA_RandomActuator : public SCA_IActuator
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        /* 1. setSeed                                                            */
        KX_PYMETHOD_DOC(SCA_RandomActuator,SetSeed);
index 12f3e0bf5ed9cf1f4b88699b4f67fe937351da75..f747504a697a93f8dea37c3258b948e3e8dd38b8 100644 (file)
@@ -153,7 +153,7 @@ PyMethodDef SCA_RandomSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* SCA_RandomSensor::_getattr(char* attr) {
+PyObject* SCA_RandomSensor::_getattr(const STR_String& attr) {
        _getattr_up(SCA_ISensor);
 }
 
index 41f7f453556fb6e784d5fefd58b8ec3fe0237cb4..1a3c0402e311a868c1542b2191566d778e997c47 100644 (file)
@@ -61,7 +61,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        /* 1. setSeed                                                            */
        KX_PYMETHOD_DOC(SCA_RandomSensor,SetSeed);
index aed6b6a97a17cd5e5b51ffbb438f3fa727a3a4a5..23bc35fdeacb5a68a7989fe5973729f505032e82 100644 (file)
@@ -146,7 +146,7 @@ PyMethodDef KX_NetworkMessageActuator::Methods[] = {
        {NULL,NULL} // Sentinel
 };
 
-PyObject* KX_NetworkMessageActuator::_getattr(char* attr) {
+PyObject* KX_NetworkMessageActuator::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IActuator);
 }
 
index 7797a6139a06e34e232e87c3aea07372d97a8422..cec3b27c4a6b6a195de2f948af93d1ddbc62e2d2 100644 (file)
@@ -64,7 +64,7 @@ public:
        /* Python interface ------------------------------------------- */
        /* ------------------------------------------------------------ */
 
-       virtual PyObject* _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        KX_PYMETHOD(KX_NetworkMessageActuator, SetToPropName);
        KX_PYMETHOD(KX_NetworkMessageActuator, SetSubject);
index ab5f9b989a70aac1017dcfd2b5764ab7345d9a6d..b44269faa9aaea29c8d1b6e41d5bad9318450add 100644 (file)
@@ -203,7 +203,7 @@ PyMethodDef KX_NetworkMessageSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* KX_NetworkMessageSensor::_getattr(char* attr) {
+PyObject* KX_NetworkMessageSensor::_getattr(const STR_String& attr) {
        _getattr_up(SCA_ISensor); // implicit return!
 }
 
index f2b8b306d9d09caac8ff7d8853c559139066b48f..82f83787645785675f6dae6a3dd3c4283d683170 100644 (file)
@@ -74,7 +74,7 @@ public:
        /* Python interface -------------------------------------------- */
        /* ------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        KX_PYMETHOD_DOC(KX_NetworkMessageSensor, SetSubjectFilterText);
        KX_PYMETHOD_DOC(KX_NetworkMessageSensor, GetFrameMessageCount);
index b422585957e5c46a0b70192e94742e5d806793d4..efa7fb73ba54f5c772c382ca819f8424066653b3 100644 (file)
@@ -202,7 +202,7 @@ PyMethodDef KX_CDActuator::Methods[] = {
 
 
 
-PyObject* KX_CDActuator::_getattr(char* attr)
+PyObject* KX_CDActuator::_getattr(const STR_String& attr)
 {
        _getattr_up(SCA_IActuator);
 }
index 1cf188e952c5548581467ff2df7a836688645386..3e76db56264534454e29be8dd25c15e9389963c5 100644 (file)
@@ -84,7 +84,7 @@ public:
        /* Python interface --------------------------------------------------- */
        /* -------------------------------------------------------------------- */
 
-       PyObject*  _getattr(char *attr);
+       virtual PyObject*  _getattr(const STR_String& attr);
 
        KX_PYMETHOD(KX_CDActuator,StartCD);
        KX_PYMETHOD(KX_CDActuator,PauseCD);
index f1286de1bd4afd096edc2c188c6891bdac09ec8b..478bf388fb123ed945fb6032957f9aabe854f182 100644 (file)
@@ -362,7 +362,7 @@ PyMethodDef KX_CameraActuator::Methods[] = {
        {NULL,NULL,NULL,NULL} //Sentinel
 };
 
-PyObject* KX_CameraActuator::_getattr(char* attr) {
+PyObject* KX_CameraActuator::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IActuator);
 }
 
index bb3bcf52323a88a2d9ace63c13f9df05d6f27181..21d4af641356d5030d13f1da5d1c382cfe2aa13c 100644 (file)
@@ -119,7 +119,7 @@ private :
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        
 
index e91c82cc81144ae1c2a3602418f1de7a687e6926..b60841e86340696a047cfad0b3d7f6853eeb074b 100644 (file)
@@ -223,7 +223,7 @@ PyMethodDef KX_ConstraintActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* KX_ConstraintActuator::_getattr(char* attr) {
+PyObject* KX_ConstraintActuator::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IActuator);
 }
 
index 07befb3551d4ae4a59466a055f7b29ffe412dba3..800a1ae10fb392fc3aa135fdea98fdd815467b66 100644 (file)
@@ -93,7 +93,7 @@ class KX_ConstraintActuator : public SCA_IActuator
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        KX_PYMETHOD_DOC(KX_ConstraintActuator,SetDamp);
        KX_PYMETHOD_DOC(KX_ConstraintActuator,GetDamp);
index e42ae59e2bb5dfb091c4af2bacffa2ffb0877352..9ca9517c0358c41237477e2ae49998058440c0e5 100644 (file)
@@ -95,13 +95,13 @@ PyParentObject KX_ConstraintWrapper::Parents[] = {
        NULL
 };
 
-PyObject*      KX_ConstraintWrapper::_getattr(char* attr)
+PyObject*      KX_ConstraintWrapper::_getattr(const STR_String& attr)
 {
        //here you can search for existing data members (like mass,friction etc.)
        _getattr_up(PyObjectPlus);
 }
 
-int    KX_ConstraintWrapper::_setattr(char* attr,PyObject* pyobj)
+int    KX_ConstraintWrapper::_setattr(const STR_String& attr,PyObject* pyobj)
 {
        
        PyTypeObject* type = pyobj->ob_type;
index 9f4bb78bdc4194c044289c28e99f49d59a8c5b9e..12fd7fbe29226327257e1b3184af4a66e35194ec 100644 (file)
@@ -38,8 +38,8 @@
 class  KX_ConstraintWrapper : public PyObjectPlus
 {
        Py_Header;
-       PyObject*                       _getattr(char* attr);
-       virtual int                     _setattr(char *attr, PyObject *value);
+       virtual PyObject*               _getattr(const STR_String& attr);
+       virtual int                     _setattr(const STR_String& attr, PyObject *value);
 public:
        KX_ConstraintWrapper(PHY_ConstraintType ctype,int constraintId,class PHY_IPhysicsEnvironment* physenv,PyTypeObject *T = &Type);
        virtual ~KX_ConstraintWrapper ();
index dcdb9b00087febc13e45a024e7a08c1a6b447ea5..2cd7e4db51832a3ec7f072deb4fd4f72e9770698 100644 (file)
@@ -213,7 +213,7 @@ PyObject* KX_GameActuator::PySetFile(PyObject* self, PyObject* args, PyObject* k
        
 
 
-PyObject* KX_GameActuator::_getattr(char* attr)
+PyObject* KX_GameActuator::_getattr(const STR_String& attr)
 {
        _getattr_up(SCA_IActuator);
 }
index 4f197cf584159c0986342de9934a09e66c6780b3..b3acd3b740068308b662270db7000a6be25754f5 100644 (file)
@@ -77,7 +77,7 @@ class KX_GameActuator : public SCA_IActuator
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
        KX_PYMETHOD_DOC(KX_GameActuator,GetFile);
        KX_PYMETHOD_DOC(KX_GameActuator,SetFile);
        
index 91ff9e624595b4a5173f445181fa26abf3dc2c3b..c20f874fcc959c4fdb9db4d56cdfeed08a3c4396 100644 (file)
@@ -700,7 +700,7 @@ PyParentObject KX_GameObject::Parents[] = {
 
 
 
-PyObject* KX_GameObject::_getattr(char* attr)
+PyObject* KX_GameObject::_getattr(const STR_String& attr)
 {
        _getattr_up(SCA_IObject);
 }
index 92333329f9e5b70de980848fdbcfea85e2fbdb24..6d2b8dc49eb9f9b2daed36d518eff1d47d972799 100644 (file)
@@ -431,7 +431,7 @@ PyMethodDef KX_IpoActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* KX_IpoActuator::_getattr(char* attr) {
+PyObject* KX_IpoActuator::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IActuator);
 }
 
index e5cd1b943a85de0a3d202a201df9f61cd374aa12..49c06a74ece4c7abceef78b158551e0461b513fa 100644 (file)
@@ -120,7 +120,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
        //KX_PYMETHOD_DOC
        KX_PYMETHOD_DOC(KX_IpoActuator,Set);
        KX_PYMETHOD_DOC(KX_IpoActuator,SetProperty);
index 4b5580ed4382dd741520dc360e49ff161dcb96e3..4cde3ea9025de1f1ec3d73325d7a1acbd6f65354 100644 (file)
@@ -76,7 +76,7 @@ PyMethodDef KX_MeshProxy::Methods[] = {
 };
 
 PyObject*
-KX_MeshProxy::_getattr(char* attr)
+KX_MeshProxy::_getattr(const STR_String& attr)
 {
   _getattr_up(SCA_IObject);
 }
index 63feb220f67671d4799686e858f0da0eff274016..d40f8b514d274c61d68730b539b47ec08d3c629e 100644 (file)
@@ -54,7 +54,7 @@ public:
        virtual CValue*         GetReplica();
 
 // stuff for python integration
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject*  _getattr(const STR_String& attr);
        KX_PYMETHOD(KX_MeshProxy,GetNumMaterials);
        KX_PYMETHOD(KX_MeshProxy,GetMaterialName);
        KX_PYMETHOD(KX_MeshProxy,GetTextureName);
index 3d6264674bc330520f6bba4955372c483dbd69e2..fc89bf5e042b3f05ccbd210e2fb070ea35ee7199 100644 (file)
@@ -357,7 +357,7 @@ PyMethodDef KX_MouseFocusSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* KX_MouseFocusSensor::_getattr(char* attr) {
+PyObject* KX_MouseFocusSensor::_getattr(const STR_String& attr) {
        _getattr_up(SCA_MouseSensor);
 }
 
index 06a38434914ac9ea3e2e8b4ba93d1c28a43ec8a1..61571e190ec2fbc414a2c74129b4677e34bf5e50 100644 (file)
@@ -82,7 +82,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
        /* --------------------------------------------------------------------- */
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject*  _getattr(const STR_String& attr);
 
        KX_PYMETHOD_DOC(KX_MouseFocusSensor,GetRayTarget);
        KX_PYMETHOD_DOC(KX_MouseFocusSensor,GetRaySource);
index 880d0d61c1660e54d462ecf6be1b08826ad562eb..3c6a5b9ba5e30d5c40e1044e0166ca7f9314a131 100644 (file)
@@ -266,7 +266,7 @@ PyMethodDef KX_NearSensor::Methods[] = {
 
 
 PyObject*
-KX_NearSensor::_getattr(char* attr)
+KX_NearSensor::_getattr(const STR_String& attr)
 {
   _getattr_up(KX_TouchSensor);
 }
index 335edbb97ca921bd35563d4b91f8c82144c001f5..d11265107280d19e730c2d08bbf60bb9071a4631 100644 (file)
@@ -77,7 +77,7 @@ public:
                                                 const DT_CollData * coll_data); 
        virtual void RegisterSumo(KX_TouchEventManager *touchman);
        
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
 };
 
index 1f4e61f81399d29067512484a5acdee6a39eebb5..04385859994b269c2ab1671556412f806f20b61a 100644 (file)
@@ -89,10 +89,8 @@ bool KX_ObjectActuator::Update(double curtime,double deltatime)
                                        (m_bitLocalFlag.AngularVelocity) != 0
                                );
                        m_active_combined_velocity = false;
-                       return false;
-               } else {
-                       return false; 
-               }
+               } 
+               return false; 
 
        } else 
        if (parent)
@@ -209,7 +207,7 @@ PyMethodDef KX_ObjectActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* KX_ObjectActuator::_getattr(char* attr) {
+PyObject* KX_ObjectActuator::_getattr(const STR_String& attr) {
        _getattr_up(SCA_IActuator);
 };
 
index f398f68b6c3e95bea869c444caf7c469157fd7cd..92365eba3cab600ad34a85f01908c79db85907ed 100644 (file)
@@ -121,7 +121,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
        
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        KX_PYMETHOD(KX_ObjectActuator,GetForce);
        KX_PYMETHOD(KX_ObjectActuator,SetForce);
index d692af82b7a915d97d46dde3969a1a0244f02a07..1bd5a0b3d42b80cb16867c39c7ac5cd8a7034171 100644 (file)
@@ -131,15 +131,14 @@ PyParentObject KX_PhysicsObjectWrapper::Parents[] = {
        NULL
 };
 
-PyObject*      KX_PhysicsObjectWrapper::_getattr(char* attr)
+PyObject*      KX_PhysicsObjectWrapper::_getattr(const STR_String& attr)
 {
        _getattr_up(PyObjectPlus);
 }
 
 
-int    KX_PhysicsObjectWrapper::_setattr(char* attr,PyObject* pyobj)
+int    KX_PhysicsObjectWrapper::_setattr(const STR_String& attr,PyObject* pyobj)
 {
-       
        PyTypeObject* type = pyobj->ob_type;
        int result = 1;
 
@@ -154,6 +153,7 @@ int KX_PhysicsObjectWrapper::_setattr(char* attr,PyObject* pyobj)
        }
        if (result)
                result = PyObjectPlus::_setattr(attr,pyobj);
+               
        return result;
 };
 
index e1a8d20b1a12bbb62784180c571f3ae2a66098ad..3de94795b16a40f4461e22a9315b70728ccc268e 100644 (file)
@@ -39,8 +39,8 @@ class KX_PhysicsObjectWrapper : public PyObjectPlus
 {
        Py_Header;
 
-       PyObject*                       _getattr(char* attr);
-       virtual int                     _setattr(char *attr, PyObject *value);
+       virtual PyObject*               _getattr(const STR_String& attr);
+       virtual int                     _setattr(const STR_String& attr, PyObject *value);
 public:
        KX_PhysicsObjectWrapper(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsEnvironment* physenv,PyTypeObject *T = &Type);
        virtual ~KX_PhysicsObjectWrapper();
index 923a38cb7cc177051483e241cc5c2fb1c2b3c8f2..d167349789ce3d836df9c61f8bf52fb57efcb99e 100644 (file)
@@ -171,7 +171,7 @@ PyMethodDef KX_RadarSensor::Methods[] = {
        {NULL,NULL,NULL,NULL} //Sentinel
 };
 
-PyObject* KX_RadarSensor::_getattr(char* attr) {
+PyObject* KX_RadarSensor::_getattr(const STR_String& attr) {
        _getattr_up(KX_TouchSensor);
 }
 
index 03364ae9c29d7b1534a9e2db87834eb0af93b069..055041f749c8f3b504f6efe5f020afcfd6d762d5 100644 (file)
@@ -82,7 +82,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
        
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        KX_PYMETHOD_DOC(KX_RadarSensor,GetConeOrigin);
        KX_PYMETHOD_DOC(KX_RadarSensor,GetConeTarget);
index 3db65783661dcccebe636d46a1884eeeddf7f116..3832d95f059e12326b7058bd904eb86cd52474fd 100644 (file)
@@ -414,6 +414,6 @@ PyObject* KX_RaySensor::PyGetHitNormal(PyObject* self,
 
 
 
-PyObject* KX_RaySensor::_getattr(char* attr) {
+PyObject* KX_RaySensor::_getattr(const STR_String& attr) {
        _getattr_up(SCA_ISensor);
 }
index 528f52f27a7abb337d062d711e477ee4cee41df2..8d361f53d3e22e4a4a2aa65736c662f5a09437fb 100644 (file)
@@ -73,7 +73,7 @@ public:
        KX_PYMETHOD_DOC(KX_RaySensor,GetHitNormal);
        KX_PYMETHOD_DOC(KX_RaySensor,GetRayDirection);
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
        
 };
 
index 666d4474130f235fcfe732f0e7aeced244a4323c..37d772b9674546c58cb6d7211dff57f29d5a4505 100644 (file)
@@ -93,17 +93,7 @@ bool KX_SCA_AddObjectActuator::Update(double curtime,
                SCA_IObject* replica = m_scene->AddReplicaObject(m_OriginalObject,GetParent(),m_timeProp );
                KX_GameObject * game_obj = static_cast<KX_GameObject *>(replica);
                game_obj->setLinearVelocity(m_linear_velocity,m_localFlag);
-
-               //if (game_obj->GetSumoObject())
-               //{
-                       // If this is object is also controlled by physics.
-                       // we have to inform the physics controller that 
-                       // we no longer take control of the object.
-               //      game_obj->GetPhysicsController()->ResolveCombinedVelocities(m_linear_velocity,
-               //                                                                                                                              MT_Vector3(0,0,0),
-               //                                                                                                                              m_localFlag,
-               //                                                                                                                              false);
-               //}
+               game_obj->ResolveCombinedVelocities(m_linear_velocity, MT_Vector3(0., 0., 0.), m_localFlag, false);
 
                // keep a copy of the last object, to allow python scripters to change it
                if (m_lastCreatedObject)
@@ -184,7 +174,7 @@ PyMethodDef KX_SCA_AddObjectActuator::Methods[] = {
 };
 
 
-PyObject* KX_SCA_AddObjectActuator::_getattr(char* attr)
+PyObject* KX_SCA_AddObjectActuator::_getattr(const STR_String& attr)
 {
   _getattr_up(SCA_IActuator);
 }
index d5176bcd38e966d66eb40e0767c59078a14c6b4e..d9f82e7251e40e065270d2e75b6a0a88ac65aca6 100644 (file)
@@ -98,9 +98,9 @@ public:
                double deltatime
        );
 
-               PyObject*  
+       virtual PyObject*  
        _getattr(
-               char *attr
+               const STR_String& attr
        );
 
                SCA_IObject*    
index a549ef56714ff28e7a7a89a3c2782d07f999e493..e91f0b86b712b276bc12d21c46b3168555469b33 100644 (file)
@@ -133,7 +133,7 @@ PyMethodDef KX_SCA_EndObjectActuator::Methods[] = {
 };
 
 
-PyObject* KX_SCA_EndObjectActuator::_getattr(char* attr)
+PyObject* KX_SCA_EndObjectActuator::_getattr(const STR_String& attr)
 {
   _getattr_up(SCA_IActuator);
 }
index 60c97322223585d5cc770354611729e2ca19b508..3b6e340f8724eb8c96644a335025cfea1cc365db 100644 (file)
@@ -70,9 +70,9 @@ class KX_SCA_EndObjectActuator : public SCA_IActuator
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-               PyObject*  
+       virtual PyObject*  
        _getattr(
-               char *attr
+               const STR_String& attr
        );
        
 }; /* end of class KX_EditObjectActuator : public SCA_PropertyActuator */
index 060afe060ee3565cc5553284f66e6a699eac073a..2480724986bd2e627bbdd3ef9422c739da240069 100644 (file)
@@ -89,7 +89,7 @@ PyMethodDef KX_SCA_ReplaceMeshActuator::Methods[] = {
 
 
 
-PyObject* KX_SCA_ReplaceMeshActuator::_getattr(char* attr)
+PyObject* KX_SCA_ReplaceMeshActuator::_getattr(const STR_String& attr)
 {
   _getattr_up(SCA_IActuator);
 }
index e0bb2c0a9b8cb37782128e10296b844a6334311e..cc7bd8c9c6a7e8f46cde6765b66dcd53353d62e5 100644 (file)
@@ -75,9 +75,9 @@ class KX_SCA_ReplaceMeshActuator : public SCA_IActuator
                double deltatime
        );
 
-               PyObject*  
+       virtual PyObject*  
        _getattr(
-               char *attr
+               const STR_String& attr
        );
 
        /* 1. setMesh */
index e07719ea680d9fe4dcdc305fae6acd2ece0703c8..996b671094a1ddb4b8977ec217ccb573bceeab6d 100644 (file)
@@ -224,7 +224,7 @@ PyMethodDef KX_SceneActuator::Methods[] =
 
 
 
-PyObject* KX_SceneActuator::_getattr(char* attr)
+PyObject* KX_SceneActuator::_getattr(const STR_String& attr)
 {
        _getattr_up(SCA_IActuator);
 }
index 38de267092ce4631563568154f9bc17ef3246fd5..76039fcf4364badba7b4abc4bd54f5efae29cb3c 100644 (file)
@@ -92,7 +92,7 @@ class KX_SceneActuator : public SCA_IActuator
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        /* 1. set                                                                */
        /* Removed */
index 3e2103245f1be0eb90d15cfcbb81fb98a5c0816e..6f959f0273b6cadfa026eaf55ba1c172a5ab73a6 100644 (file)
@@ -262,7 +262,7 @@ PyMethodDef KX_SoundActuator::Methods[] = {
 
 
 
-PyObject* KX_SoundActuator::_getattr(char* attr)
+PyObject* KX_SoundActuator::_getattr(const STR_String& attr)
 {
        _getattr_up(SCA_IActuator);
 }
index 0ae1ef39d972e75616714342e4c79e8d4bbce00c..7cdf60131800564f7370f0eb35fd9ea95e6b41e4 100644 (file)
@@ -83,7 +83,7 @@ public:
        /* Python interface --------------------------------------------------- */
        /* -------------------------------------------------------------------- */
 
-       PyObject*  _getattr(char *attr);
+       virtual PyObject*  _getattr(const STR_String& attr);
 
        KX_PYMETHOD(KX_SoundActuator,SetFilename);
        KX_PYMETHOD(KX_SoundActuator,GetFilename);
index 29d9109c27248150fe16b9f8b7a33f14bd3f77c1..9baa9377f02c227e903c30637ce080a97064a535 100644 (file)
@@ -246,7 +246,7 @@ PyMethodDef KX_TouchSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-PyObject* KX_TouchSensor::_getattr(char* attr) {
+PyObject* KX_TouchSensor::_getattr(const STR_String& attr) {
        _getattr_up(SCA_ISensor);
 }
 
index 4f2ac2d99fa1d202792b47459fd2b155295ca458..9dd17a5fe83dbdb32ea09420bd52854f40589369 100644 (file)
@@ -107,7 +107,7 @@ public:
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
        
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        /* 1. setProperty */
        KX_PYMETHOD_DOC(KX_TouchSensor,SetProperty);
index 6dcb6281a631cd92844eae91daf083a5e6d193d1..c02cdbc17be1ddd07e3c029dceaf69b5eb52d69a 100644 (file)
@@ -386,7 +386,7 @@ PyMethodDef KX_TrackToActuator::Methods[] = {
 
 
 
-PyObject* KX_TrackToActuator::_getattr(char* attr)
+PyObject* KX_TrackToActuator::_getattr(const STR_String& attr)
 {
        _getattr_up(SCA_IActuator);
 }
index f549969a9f99ab2afae6e3911ae53c662cea958f..817bb4a8cface9d730b3ed2b9f03f7f70ebe6c41 100644 (file)
@@ -65,7 +65,7 @@ class KX_TrackToActuator : public SCA_IActuator
        virtual bool Update(double curtime,double deltatime);
 
        /* Python part */
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
        
        /* 1. setObject */
        KX_PYMETHOD_DOC(KX_TrackToActuator,SetObject);
index b9cb9affe72ef2814597ed205efc8735085b79b3..a8c6d0f921c8fb7a6575df863ba78d5041b2265e 100644 (file)
@@ -75,7 +75,7 @@ PyMethodDef KX_VertexProxy::Methods[] = {
 };
 
 PyObject*
-KX_VertexProxy::_getattr(char* attr)
+KX_VertexProxy::_getattr(const STR_String& attr)
 {
   _getattr_up(SCA_IObject);
 }
index 8226c2b45589d55b577471fd66ddf403f23f15ef..f447014b8b81101d4f46f76c1b514c09dd4f46c8 100644 (file)
@@ -55,7 +55,7 @@ public:
 
 
 // stuff for python integration
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
 
        KX_PYMETHOD(KX_VertexProxy,GetXYZ);
        KX_PYMETHOD(KX_VertexProxy,SetXYZ);
index ccaca4a93fb3703486a3f144d90b82480faccce6..dc0178976faba02a3a1bca1341b12817aee8b951 100644 (file)
@@ -132,7 +132,7 @@ KX_VisibilityActuator::Methods[] = {
 
 PyObject* 
 KX_VisibilityActuator::_getattr(
-       char* attr
+       const STR_String& attr
        ) 
 {
        _getattr_up(SCA_IActuator);
index 7e9a0aeca75de81ad7c86207cf61e6e0d7585c59..9d5d38666f1945abb7b3253068f61f087b24e0ad 100644 (file)
@@ -71,7 +71,7 @@ class KX_VisibilityActuator : public SCA_IActuator
        /* Python interface ---------------------------------------------------- */
        /* --------------------------------------------------------------------- */
 
-       virtual PyObject*  _getattr(char *attr);
+       virtual PyObject* _getattr(const STR_String& attr);
        //KX_PYMETHOD_DOC
        KX_PYMETHOD_DOC(KX_VisibilityActuator,SetVisible);