summaryrefslogtreecommitdiffstats
path: root/src/extension/script/InkscapePython.cpp
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2006-05-06 21:45:01 +0000
committerishmal <ishmal@users.sourceforge.net>2006-05-06 21:45:01 +0000
commitb151fcd87bfd5892dc3cd166a0944d12666aefab (patch)
tree0d2e099f46dcc747a4685727c3408c23efcdc544 /src/extension/script/InkscapePython.cpp
parentr11769@tres: ted | 2006-05-06 09:09:59 -0700 (diff)
downloadinkscape-b151fcd87bfd5892dc3cd166a0944d12666aefab.tar.gz
inkscape-b151fcd87bfd5892dc3cd166a0944d12666aefab.zip
const types
(bzr r754)
Diffstat (limited to 'src/extension/script/InkscapePython.cpp')
-rw-r--r--src/extension/script/InkscapePython.cpp20
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;
}
-
-
+
+