Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-05-16 17:05:15 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-05-16 17:05:15 +0400
commit2fd6e728513f46e1f313667dfcf6b3d6e09cad39 (patch)
tree97306352111268430c9c5bcd75c1638be098cc0d /source/gameengine/Expressions/PyObjectPlus.cpp
parent9827bf0cd7c94273e147caae6bb254cf70aed221 (diff)
Changed Python _getattr/_setattr methods to use const STR_String& instead of char* - makes using these methods much nicer.
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.cpp')
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp
index f9801fe0f60..74468cf030d 100644
--- a/source/gameengine/Expressions/PyObjectPlus.cpp
+++ b/source/gameengine/Expressions/PyObjectPlus.cpp
@@ -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;