summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Current.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'py/modules/IcePy/Current.cpp')
-rw-r--r--py/modules/IcePy/Current.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/modules/IcePy/Current.cpp b/py/modules/IcePy/Current.cpp
index 10573868b43..455c17f6e5e 100644
--- a/py/modules/IcePy/Current.cpp
+++ b/py/modules/IcePy/Current.cpp
@@ -154,7 +154,7 @@ currentGetter(CurrentObject* self, void* closure)
{
if(!self->facet)
{
- self->facet = PyString_FromString(const_cast<char*>(self->current->facet.c_str()));
+ self->facet = createString(self->current->facet);
}
Py_INCREF(self->facet);
result = self->facet;
@@ -164,7 +164,7 @@ currentGetter(CurrentObject* self, void* closure)
{
if(!self->operation)
{
- self->operation = PyString_FromString(const_cast<char*>(self->current->operation.c_str()));
+ self->operation = createString(self->current->operation);
}
Py_INCREF(self->operation);
result = self->operation;