summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Operation.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2008-05-28 08:00:51 -0700
committerBenoit Foucher <benoit@zeroc.com>2008-06-06 12:25:26 +0200
commit1efa342a0853105155623e2534a2cffce404ea7a (patch)
tree29750faaa5f5e9d38551aaeb79bf40d7f0949bbc /py/modules/IcePy/Operation.cpp
parentUpdated RHEL 5.1 section with more info (diff)
downloadice-1efa342a0853105155623e2534a2cffce404ea7a.tar.bz2
ice-1efa342a0853105155623e2534a2cffce404ea7a.tar.xz
ice-1efa342a0853105155623e2534a2cffce404ea7a.zip
bug 3141 - fixing GCC compiler warnings in IcePy
Diffstat (limited to 'py/modules/IcePy/Operation.cpp')
-rw-r--r--py/modules/IcePy/Operation.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp
index 6189a462bec..a112e6273d9 100644
--- a/py/modules/IcePy/Operation.cpp
+++ b/py/modules/IcePy/Operation.cpp
@@ -1400,14 +1400,11 @@ IcePy::SyncBlobjectInvocation::invoke(PyObject* args)
//
#if PY_VERSION_HEX < 0x02050000
const char* charBuf = 0;
- Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(
- inParams, 0, &charBuf);
- const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf);
#else
- Ice::Byte* mem;
- Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(
- inParams, 0, reinterpret_cast<char**>(&mem));
+ char* charBuf = 0;
#endif
+ Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(inParams, 0, &charBuf);
+ const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf);
pair<const ::Ice::Byte*, const ::Ice::Byte*> in(0, 0);
if(sz > 0)
{
@@ -1525,14 +1522,11 @@ IcePy::AsyncBlobjectInvocation::invoke(PyObject* args)
//
#if PY_VERSION_HEX < 0x02050000
const char* charBuf = 0;
- Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(
- inParams, 0, &charBuf);
- const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf);
#else
- Ice::Byte* mem;
- Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(
- inParams, 0, reinterpret_cast<char**>(&mem));
+ char* charBuf = 0;
#endif
+ Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(inParams, 0, &charBuf);
+ const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf);
pair<const ::Ice::Byte*, const ::Ice::Byte*> in(0, 0);
if(sz > 0)
{
@@ -2201,13 +2195,11 @@ IcePy::BlobjectUpcall::response(PyObject* args)
#if PY_VERSION_HEX < 0x02050000
const char* charBuf = 0;
- Py_ssize_t sz = arg->ob_type->tp_as_buffer->bf_getcharbuffer(arg, 0, &charBuf);
- const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf);
-
#else
- Ice::Byte* mem;
- Py_ssize_t sz = arg->ob_type->tp_as_buffer->bf_getcharbuffer(arg, 0, reinterpret_cast<char**>(&mem));
+ char* charBuf = 0;
#endif
+ Py_ssize_t sz = arg->ob_type->tp_as_buffer->bf_getcharbuffer(arg, 0, &charBuf);
+ const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf);
const pair<const ::Ice::Byte*, const ::Ice::Byte*> bytes(mem, mem + sz);
AllowThreads allowThreads; // Release Python's global interpreter lock during blocking calls.