Browse Source

Move Python string helper to the correct location

Michael Hansen 12 years ago
parent
commit
e0e141fd01
  1. 2
      Sources/Plasma/FeatureLib/pfPython/pyGlueHelpers.h
  2. 1
      Sources/Plasma/FeatureLib/pfPython/pySDLGlue.cpp

2
Sources/Plasma/FeatureLib/pfPython/pyGlueHelpers.h

@ -53,6 +53,8 @@ plString PyString_AsStringEx(PyObject* obj);
bool PyString_CheckEx(PyObject* obj);
PyObject* PyUnicode_FromStringEx(const plString& str);
#define PyString_FromPlString(x) PyString_FromString((x).c_str())
// A set of macros to take at least some of the tediousness out of creating straight python glue code
/////////////////////////////////////////////////////////////////////

1
Sources/Plasma/FeatureLib/pfPython/pySDLGlue.cpp

@ -219,7 +219,6 @@ PYTHON_METHOD_DEFINITION(ptSimpleStateVariable, setBool, args)
PYTHON_RETURN_BOOL(self->fThis->SetBool(val != 0, idx));
}
#define PyString_FromPlString(x) PyString_FromString((x).c_str())
STATEVAR_GET(getByte, GetByte, PyInt_FromLong)
STATEVAR_GET(getShort, GetShort, PyInt_FromLong)
STATEVAR_GET(getInt, GetInt, PyInt_FromLong)

Loading…
Cancel
Save