[pytango] 156/483: fix for numpy using both python 2 and 3
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:35 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 fe08d684da6efb9345a00e21310d3f67dd891b40
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Mon Oct 8 19:00:42 2012 +0000
fix for numpy using both python 2 and 3
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@21230 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
src/pytango.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/pytango.cpp b/src/pytango.cpp
index e61ca42..12ddcdb 100644
--- a/src/pytango.cpp
+++ b/src/pytango.cpp
@@ -65,7 +65,13 @@ void export_device_impl();
void export_group();
void export_log4tango();
-void init_numpy()
+#if PY_MAJOR_VERSION >= 3
+#define INIT_NUMPY_RET int
+#else
+#define INIT_NUMPY_RET void
+#endif
+
+INIT_NUMPY_RET init_numpy()
{
# ifndef DISABLE_PYTANGO_NUMPY
import_array();
--
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