From f39ed94419e4a30b8b2ba1d49c138fd245010262 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 24 May 2014 00:14:01 +0100 Subject: Fix compiler warnings in examples when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type --- Examples/python/swigrun/example.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Examples/python/swigrun/example.cxx') diff --git a/Examples/python/swigrun/example.cxx b/Examples/python/swigrun/example.cxx index 25906a559..2d2471301 100644 --- a/Examples/python/swigrun/example.cxx +++ b/Examples/python/swigrun/example.cxx @@ -9,7 +9,7 @@ Manager* convert_to_Manager(PyObject *py_obj) { Manager* c_ptr; swig_type_info *ty = SWIG_TypeQuery("Manager *"); - printf("manager ty %p \n", ty); + printf("manager ty %p \n", (void *)ty); if (SWIG_ConvertPtr(py_obj, (void **) &c_ptr, ty, 0) == -1) { c_ptr = 0; } else { -- cgit v1.2.1 From da394fae800ce121fb51d9c0ef2880fdce2f1b63 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 7 Oct 2014 20:07:32 +0100 Subject: Remove Python swigrun example By default it doesn't work as it does not call the CEO's __del__ method as indicated in the comments. __del__ is called with -builtin but then the base class's __del__ is not available and so it errors out. Python 3 and -builtin goes into an endless loop. So removing as hopelessly broken. --- Examples/python/swigrun/example.cxx | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 Examples/python/swigrun/example.cxx (limited to 'Examples/python/swigrun/example.cxx') diff --git a/Examples/python/swigrun/example.cxx b/Examples/python/swigrun/example.cxx deleted file mode 100644 index 2d2471301..000000000 --- a/Examples/python/swigrun/example.cxx +++ /dev/null @@ -1,20 +0,0 @@ -/* File : example.cxx */ - -#include -#include "swigpyrun.h" -#include "example.h" - - -Manager* convert_to_Manager(PyObject *py_obj) -{ - Manager* c_ptr; - swig_type_info *ty = SWIG_TypeQuery("Manager *"); - printf("manager ty %p \n", (void *)ty); - if (SWIG_ConvertPtr(py_obj, (void **) &c_ptr, ty, 0) == -1) { - c_ptr = 0; - } else { - Py_XINCREF(py_obj); - } - return c_ptr; -} - -- cgit v1.2.1