[pytango] 162/483: make sure no warning is given in init_numpy
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:36 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 2fe8bdb51ef46fef0a2cfd16da8a052a42ab2453
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Wed Oct 10 08:30:38 2012 +0000
make sure no warning is given in init_numpy
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@21251 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
src/pytango.cpp | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/pytango.cpp b/src/pytango.cpp
index 12ddcdb..ad80c1d 100644
--- a/src/pytango.cpp
+++ b/src/pytango.cpp
@@ -65,19 +65,14 @@ void export_device_impl();
void export_group();
void export_log4tango();
-#if PY_MAJOR_VERSION >= 3
-#define INIT_NUMPY_RET int
+#ifdef DISABLE_PYTANGO_NUMPY
+void init_numpy(void) {}
+#elif PY_MAJOR_VERSION >= 3
+void* init_numpy(void) { import_array(); return NULL; }
#else
-#define INIT_NUMPY_RET void
+void init_numpy(void) { import_array(); return; }
#endif
-INIT_NUMPY_RET init_numpy()
-{
-# ifndef DISABLE_PYTANGO_NUMPY
- import_array();
-# endif
-}
-
BOOST_PYTHON_MODULE(_PyTango)
{
--
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