[pytango] 176/483: - Changed static_cast to a c-like cast to unsigned char* of PyArray_DATA due to its different type in Numpy 1.8 - Modified Makefile to process LOG4TANGO_ROOT, BOOST_ROOT, ZMQ_ROOT and OMNI_ROOT paths

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:38 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit d3f45cf71ac39a96e7518a966bb9567cceb2349a
Author: trogucki <trogucki at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Wed Nov 28 10:46:00 2012 +0000

    - Changed static_cast to a c-like cast to unsigned char* of PyArray_DATA due to its different type in Numpy 1.8
    - Modified Makefile to process LOG4TANGO_ROOT, BOOST_ROOT, ZMQ_ROOT and OMNI_ROOT paths
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@21625 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 Makefile                         | 28 ++++++++++++++++++++++------
 src/server/encoded_attribute.cpp | 12 ++++++------
 2 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 5d40d84..dde091b 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,11 @@
 # Makefile to generate the PyTango library
 # Needs the following environment variables to be defined:
 # - TANGO_ROOT
-# - NUMY_ROOT
+# - LOG4TANGO_ROOT
+# - OMNI_ROOT
+# - BOOST_ROOT
+# - ZMQ_ROOT
+# - NUMPY_ROOT
 #
 # if target == install also needs: prefix=<install_dir>
 # ex: make install prefix=/home/homer/.local/lib/python2.6/site-packages
@@ -38,10 +42,6 @@
 # - PY3K: if defined use python 3 boost python
 # - PY_VER: use a specific python version (default is empty) (ex: 3.2)
 
-ifndef TANGO_ROOT
-TANGO_ROOT=/usr
-endif
-
 ifdef PY_VER
 PY_EXC=python$(PY_VER)
 PY_MAJOR=$(shell $(PY_EXC) -c "import sys; sys.stdout.write(str(sys.version_info[0]))")
@@ -88,7 +88,23 @@ LN_STATIC = g++ -pthread -static -Wl,-O1 -Wl,-Bsymbolic-functions
 LN_VER = -Wl,-h -Wl,--strip-all
 BOOST_LIB = boost_python-py$(PY_VER_S)
 LN_LIBS = -ltango -llog4tango -lpthread -lrt -ldl -lomniORB4 -lomniDynamic4 -lomnithread -lCOS4 -l$(BOOST_LIB) -lzmq
-LN_DIRS = -L$(TANGO_ROOT)/lib
+ifdef TANGO_ROOT
+LN_DIRS += -L$(TANGO_ROOT)/lib
+endif
+ifdef LOG4TANGO_ROOT
+LN_DIRS += -L$(LOG4TANGO_ROOT)/lib
+endif
+ifdef OMNI_ROOT
+LN_DIRS += -L$(OMNI_ROOT)/lib
+endif
+ifdef BOOST_ROOT
+LN_DIRS += -L$(BOOST_ROOT)/lib
+endif
+ifdef ZMQ_ROOT
+LN_DIRS += -L$(ZMQ_ROOT)/lib
+endif
+
+#LN_DIRS = -L$(TANGO_ROOT)/lib -L$(LOG4TANGO_ROOT)/lib -L$(OMNI_ROOT)/lib -L$(BOOST_ROOT)/lib -L$(ZMQ_ROOT)/lib
 
 INCLUDE_DIRS = \
     -Isrc \
diff --git a/src/server/encoded_attribute.cpp b/src/server/encoded_attribute.cpp
index 4a44179..91d1369 100644
--- a/src/server/encoded_attribute.cpp
+++ b/src/server/encoded_attribute.cpp
@@ -80,7 +80,7 @@ namespace PyEncodedAttribute
             w = PyArray_DIM(py_value_ptr, 1);
             h = PyArray_DIM(py_value_ptr, 0);
             
-            buffer = static_cast<unsigned char*>(PyArray_DATA(py_value_ptr));
+            buffer = (unsigned char*)(PyArray_DATA(py_value_ptr));
             self.encode_gray8(buffer, w, h);
             return;
         }
@@ -194,7 +194,7 @@ namespace PyEncodedAttribute
             w = PyArray_DIM(py_value_ptr, 1);
             h = PyArray_DIM(py_value_ptr, 0);
             
-            buffer = static_cast<unsigned char*>(PyArray_DATA(py_value_ptr));
+            buffer = (unsigned char*)(PyArray_DATA(py_value_ptr));
             self.encode_jpeg_gray8(buffer, w, h, quality);
             return;
         }
@@ -308,7 +308,7 @@ namespace PyEncodedAttribute
             w = PyArray_DIM(py_value_ptr, 1);
             h = PyArray_DIM(py_value_ptr, 0);
             
-            buffer = static_cast<unsigned short*>(PyArray_DATA(py_value_ptr));
+            buffer = (unsigned short*)(PyArray_DATA(py_value_ptr));
             self.encode_gray16(buffer, w, h);
             return;
         }
@@ -418,7 +418,7 @@ namespace PyEncodedAttribute
 #ifndef DISABLE_PYTANGO_NUMPY
         else if (PyArray_Check(py_value_ptr))
         {
-            buffer = static_cast<unsigned char*>(PyArray_DATA(py_value_ptr));
+            buffer = (unsigned char*)(PyArray_DATA(py_value_ptr));
             self.encode_rgb24(buffer, w, h);
             return;
         }
@@ -532,7 +532,7 @@ namespace PyEncodedAttribute
 #ifndef DISABLE_PYTANGO_NUMPY
         else if (PyArray_Check(py_value_ptr))
         {
-            buffer = static_cast<unsigned char*>(PyArray_DATA(py_value_ptr));
+            buffer = (unsigned char*)(PyArray_DATA(py_value_ptr));
             self.encode_jpeg_rgb24(buffer, w, h, quality);
             return;
         }
@@ -646,7 +646,7 @@ namespace PyEncodedAttribute
 #ifndef DISABLE_PYTANGO_NUMPY
         else if (PyArray_Check(py_value_ptr))
         {
-            buffer = static_cast<unsigned char*>(PyArray_DATA(py_value_ptr));
+            buffer = (unsigned char*)(PyArray_DATA(py_value_ptr));
             self.encode_jpeg_rgb32(buffer, w, h, quality);
             return;
         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list