Update of /cvsroot/mahogany/M/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31208/src/Python
Modified Files:
Names.mk PythonDll.cpp PythonHelp.cpp
Log Message:
updated to build with recent swig (>= 1.3.25)
Index: Names.mk
===================================================================
RCS file: /cvsroot/mahogany/M/src/Python/Names.mk,v
retrieving revision 1.13
retrieving revision 1.14
diff -b -u -2 -r1.13 -r1.14
--- Names.mk 21 Jul 2004 10:55:12 -0000 1.13
+++ Names.mk 15 Dec 2005 19:40:04 -0000 1.14
@@ -22,33 +22,15 @@
endef
-# swiglib.i only exists for global stuff to be compiled in it and for this we
-# must define this symbol when compiling it
-#
-# also see "-c" swig option handling below: it must not be specified for
-# swiglib
-CXXFLAGS_Python_swiglib_o := -DSWIG_GLOBAL
-
ifdef SWIG
# this command replaces #include Python.h in the generated C++ code with
# #include MPython.h which we need for dynamic Python linking to work
-#
-# further, newer versions of swig (1.3.21) now automatically rename SWIG_xxx
-# functions to SWIG_Python_xxx which is very nice but incompatible with the
-# old versions because we have to also declare these functions ourselves as
-# they're not declared in any header -- and as we don't have an easy way to
-# check how the functionsare called we simply disable the #define's which do
-# the renaming in swig-generated code
define create_cpp
- $(SWIG) -I$(IFACE_DIR) $(CPPFLAGS) $(SWIGFLAGS) \
- $(if $(subst swiglib,,$*),-c) -o $(@:.o=.cpp) $< && \
- sed -e 's/Python\.h/MPython.h/' \
- -e '/^#define SWIG_\(\w\+\) \+SWIG_Python_\1/d' \
- -e '/^#define SWIG_\w\+(.*\\$$/,/^ \+SWIG_Python_\w\+(/d' \
- -e 's/SWIG_Python_/SWIG_/g' $(@:.o=.cpp) \
- > $(@:.o=.cpp).new && mv $(@:.o=.cpp).new $(@:.o=.cpp)
+ $(SWIG) -I$(IFACE_DIR) $(CPPFLAGS) $(SWIGFLAGS) -o $(@:.o=.cpp) $< && \
+ sed -e 's/Python\.h/MPython.h/' $(@:.o=.cpp) > $(@:.o=.cpp).new && \
+ mv $(@:.o=.cpp).new $(@:.o=.cpp)
endef
-SWIGFLAGS := -c++ -python -shadow
+SWIGFLAGS := -c++ -python
vpath %.i $(IFACE_DIR)
Python/%.o Python/%.py: %.i
Index: PythonDll.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/Python/PythonDll.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -b -u -2 -r1.20 -r1.21
--- PythonDll.cpp 9 Apr 2005 19:56:57 -0000 1.20
+++ PythonDll.cpp 15 Dec 2005 19:40:04 -0000 1.21
@@ -109,4 +109,5 @@
PyObject*(*M_PyString_FromString)(const char *) = NULL;
PyObject*(*M_PyString_FromStringAndSize)(const char *, int) = NULL;
+ PyObject*(*M_PyString_FromFormat)(const char *, ...) = NULL;
int(*M_PyString_Size)(PyObject *) = NULL;
PyTypeObject* M_PyString_Type = NULL;
@@ -219,4 +220,5 @@
PYTHON_FUNC(PyString_FromString)
PYTHON_FUNC(PyString_FromStringAndSize)
+ PYTHON_FUNC(PyString_FromFormat)
PYTHON_FUNC(PyString_InternFromString)
PYTHON_FUNC(PyString_Type)
Index: PythonHelp.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/Python/PythonHelp.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -b -u -2 -r1.41 -r1.42
--- PythonHelp.cpp 9 May 2005 07:29:07 -0000 1.41
+++ PythonHelp.cpp 15 Dec 2005 19:40:04 -0000 1.42
@@ -36,12 +36,7 @@
#include "InitPython.h"
-#include "Mdefaults.h"
+#include "Mswigpyrun.h"
-extern "C"
-{
- struct swig_type_info;
- extern swig_type_info *SWIG_TypeQuery(const char *);
- extern PyObject *SWIG_NewPointerObj(void *, swig_type_info *, int);
-}
+#include "Mdefaults.h"
// ----------------------------------------------------------------------------
@@ -214,5 +209,5 @@
String ptrCls(classname);
ptrCls += _T(" *");
- PyObject *object = SWIG_NewPointerObj(obj, SWIG_TypeQuery(ptrCls), 0);
+ PyObject *object = SWIG_Python_NewPointerObj(obj,
SWIG_TypeQuery(ptrCls), 0);
// and do call the function
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates