summaryrefslogtreecommitdiff
path: root/py
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
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')
-rw-r--r--py/config/Make.rules3
-rw-r--r--py/modules/IcePy/Operation.cpp26
2 files changed, 11 insertions, 18 deletions
diff --git a/py/config/Make.rules b/py/config/Make.rules
index 63443d9e4e3..b5be3658000 100644
--- a/py/config/Make.rules
+++ b/py/config/Make.rules
@@ -56,7 +56,8 @@ ifneq ($(PYTHON_HOME),)
# The Python shared library is installed in $(PYTHON_HOME)/lib on HP-UX
# rather than $(PYTHON_HOME)/lib/$(PYTHON_VERSION)/config.
#
- PYTHON_LIB_DIR = $(PYTHON_HOME)/lib
+ PYTHON_LIB_DIR = $(PYTHON_HOME)/lib/$(PYTHON_VERSION)/config
+ #PYTHON_LIB_DIR = $(PYTHON_HOME)/lib
else
#
# If multiple versions of Python are installed and you want a specific
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.