diff options
Diffstat (limited to 'src/extension/script/InkscapePython.cpp')
| -rw-r--r-- | src/extension/script/InkscapePython.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/extension/script/InkscapePython.cpp b/src/extension/script/InkscapePython.cpp index eca09951a..49e6a11a2 100644 --- a/src/extension/script/InkscapePython.cpp +++ b/src/extension/script/InkscapePython.cpp @@ -37,7 +37,7 @@ InkscapePython::InkscapePython() { } - + /* * @@ -47,15 +47,15 @@ InkscapePython::~InkscapePython() } - - + + static bool initialized = false; /* * Interpret an in-memory string */ -bool InkscapePython::interpretScript(Glib::ustring &script, - Glib::ustring &output, - Glib::ustring &error) +bool InkscapePython::interpretScript(const Glib::ustring &script, + Glib::ustring &output, + Glib::ustring &error) { if (!initialized) { @@ -67,7 +67,7 @@ bool InkscapePython::interpretScript(Glib::ustring &script, PyRun_SimpleString(inkscape_module_script); PyRun_SimpleString("inkscape = _inkscape_py.getInkscape()\n"); PyRun_SimpleString(codeStr); - + //## Check for errors if (PyErr_Occurred()) { @@ -77,7 +77,7 @@ bool InkscapePython::interpretScript(Glib::ustring &script, PyErr_Fetch(&errobj, &errdata, &errtraceback); //PyErr_Clear(); - + if (errobj && PyString_Check(errobj)) { PyObject *pystring = PyObject_Str(errobj); @@ -98,8 +98,8 @@ bool InkscapePython::interpretScript(Glib::ustring &script, return true; } - - + + |
