]> Dogcows Code - chaz/openbox/blobdiff - src/python.cc
ustring seems to be working! yay!
[chaz/openbox] / src / python.cc
index 475b7299a32965fd7e0fdc6746714e9789acaac3..f6ed7a7e7dc9bc083dad407faccfc12a9fd234de 100644 (file)
@@ -60,13 +60,13 @@ bool python_exec(const std::string &path)
 bool python_get_long(const char *name, long *value)
 {
   PyObject *val = PyDict_GetItemString(obdict, const_cast<char*>(name));
-  if (!(val && PyLong_Check(val))) return false;
+  if (!(val && PyInt_Check(val))) return false;
   
-  *value = PyLong_AsLong(val);
+  *value = PyInt_AsLong(val);
   return true;
 }
 
-bool python_get_string(const char *name, std::string *value)
+bool python_get_string(const char *name, otk::ustring *value)
 {
   PyObject *val = PyDict_GetItemString(obdict, const_cast<char*>(name));
   if (!(val && PyString_Check(val))) return false;
@@ -75,7 +75,7 @@ bool python_get_string(const char *name, std::string *value)
   return true;
 }
 
-bool python_get_stringlist(const char *name, std::vector<std::string> *value)
+bool python_get_stringlist(const char *name, std::vector<otk::ustring> *value)
 {
   PyObject *val = PyDict_GetItemString(obdict, const_cast<char*>(name));
   if (!(val && PyList_Check(val))) return false;
This page took 0.026591 seconds and 4 git commands to generate.