diff options
author | Bernard Normier <bernard@zeroc.com> | 2008-05-10 15:40:51 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2008-05-10 15:40:51 -0400 |
commit | 30ae63d16daed9faaa3d9165589e00e70386a4f5 (patch) | |
tree | 9f05a3cb3facbfab1eba9e5222e0d8d2c6c27ed6 | |
parent | Fixed option setting (diff) | |
download | ice-30ae63d16daed9faaa3d9165589e00e70386a4f5.tar.bz2 ice-30ae63d16daed9faaa3d9165589e00e70386a4f5.tar.xz ice-30ae63d16daed9faaa3d9165589e00e70386a4f5.zip |
Partial fix for bug #3141 (build warnings)
-rw-r--r-- | py/modules/IcePy/Operation.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp index 843a9ba44ca..6189a462bec 100644 --- a/py/modules/IcePy/Operation.cpp +++ b/py/modules/IcePy/Operation.cpp @@ -1399,9 +1399,10 @@ IcePy::SyncBlobjectInvocation::invoke(PyObject* args) // Use the array API to avoid copying the data. // #if PY_VERSION_HEX < 0x02050000 - const Ice::Byte* mem; + const char* charBuf = 0; Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer( - inParams, 0, reinterpret_cast<const char**>(&mem)); + 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( @@ -1523,9 +1524,10 @@ IcePy::AsyncBlobjectInvocation::invoke(PyObject* args) // Use the array API to avoid copying the data. // #if PY_VERSION_HEX < 0x02050000 - const Ice::Byte* mem; + const char* charBuf = 0; Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer( - inParams, 0, reinterpret_cast<const char**>(&mem)); + 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( @@ -2198,8 +2200,10 @@ IcePy::BlobjectUpcall::response(PyObject* args) } #if PY_VERSION_HEX < 0x02050000 - const Ice::Byte* mem; - Py_ssize_t sz = arg->ob_type->tp_as_buffer->bf_getcharbuffer(arg, 0, reinterpret_cast<const char**>(&mem)); + 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)); |