summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Proxy.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2008-01-31 06:41:01 -0800
committerMark Spruiell <mes@zeroc.com>2008-01-31 06:41:01 -0800
commit2b9fbb15c8f5b5af154bdffaf334e4b75a601e90 (patch)
treea6a3a30cb56f7dc1a15ddb5bc009d3026f67802c /py/modules/IcePy/Proxy.cpp
parentMore ICE_HOME fixes (diff)
downloadice-2b9fbb15c8f5b5af154bdffaf334e4b75a601e90.tar.bz2
ice-2b9fbb15c8f5b5af154bdffaf334e4b75a601e90.tar.xz
ice-2b9fbb15c8f5b5af154bdffaf334e4b75a601e90.zip
bug 2412: python bug with embedded nulls in strings
Diffstat (limited to 'py/modules/IcePy/Proxy.cpp')
-rw-r--r--py/modules/IcePy/Proxy.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/modules/IcePy/Proxy.cpp b/py/modules/IcePy/Proxy.cpp
index d0be96ba14d..27b8b45018a 100644
--- a/py/modules/IcePy/Proxy.cpp
+++ b/py/modules/IcePy/Proxy.cpp
@@ -104,7 +104,7 @@ static PyObject*
endpointToString(EndpointObject* self)
{
string str = (*self->endpoint)->toString();
- return PyString_FromString(const_cast<char*>(str.c_str()));
+ return createString(str);
}
//
@@ -184,7 +184,7 @@ static PyObject*
proxyRepr(ProxyObject* self)
{
string str = (*self->proxy)->ice_toString();
- return PyString_FromString(const_cast<char*>(str.c_str()));
+ return createString(str);
}
#ifdef WIN32
@@ -478,7 +478,7 @@ proxyIceGetFacet(ProxyObject* self)
return 0;
}
- return PyString_FromString(const_cast<char*>(facet.c_str()));
+ return createString(facet);
}
#ifdef WIN32
@@ -538,7 +538,7 @@ proxyIceGetAdapterId(ProxyObject* self)
return 0;
}
- return PyString_FromString(const_cast<char*>(id.c_str()));
+ return createString(id);
}
#ifdef WIN32