fix -external-runtime and warning arounds in subversion

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8666 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-02-01 08:37:53 +00:00
commit 0f7b502a3b
22 changed files with 98 additions and 83 deletions

View file

@ -2,9 +2,7 @@
* error manipulation
* ----------------------------------------------------------------------------- */
%insert("header") %{
SWIGINTERN PyObject*
SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code) {
PyObject* type = 0;
switch(code) {
@ -47,14 +45,8 @@ SWIG_Python_ErrorType(int code) {
return type;
}
SWIGINTERNINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info *desc) {
PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
PyObject *klass = data ? data->klass : 0;
return (klass ? klass : PyExc_RuntimeError);
}
SWIGINTERN void
SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char* mesg)
{
PyObject *type = 0;
@ -74,5 +66,4 @@ SWIG_Python_AddErrorMsg(const char* mesg)
}
}
%}

View file

@ -215,6 +215,13 @@ SWIG_Python_CheckImplicit(swig_type_info *ty)
return data ? data->implicitconv : 0;
}
SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info *desc) {
PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
PyObject *klass = data ? data->klass : 0;
return (klass ? klass : PyExc_RuntimeError);
}
SWIGRUNTIME PySwigClientData *
PySwigClientData_New(PyObject* obj)
@ -965,15 +972,15 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
impconv = 0;
}
if (impconv) {
PySwigObject *sobj = SWIG_Python_GetSwigThis(impconv);
if (sobj) {
PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
if (iobj) {
void *vptr;
res = SWIG_Python_ConvertPtrAndOwn((PyObject*)sobj, &vptr, ty, 0, 0);
res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
if (SWIG_IsOK(res)) {
if (ptr) {
*ptr = vptr;
/* transfer the ownership to 'ptr' */
sobj->own = 0;
iobj->own = 0;
res = SWIG_AddNewMask(SWIG_AddCast(res));
} else {
res = SWIG_AddCast(res);

View file

@ -4,8 +4,9 @@
%}
%insert(runtime) "swigrun.swg"; /* SWIG API */
%insert(runtime) "swigerrors.swg" /* SWIG errors */
%insert(runtime) "pyhead.swg"
%insert(runtime) "swigerrors.swg"; /* SWIG errors */
%insert(runtime) "pyhead.swg";
%insert(runtime) "pyerrors.swg";
%insert(runtime) "pythreads.swg"; /* Python thread code */
%insert(runtime) "pyapi.swg"; /* Pyton API */
%insert(runtime) "pyrun.swg"; /* Python run-time code */

View file

@ -9,10 +9,6 @@
* ------------------------------------------------------------ */
%include <pymacros.swg>
/* ------------------------------------------------------------
* Error manipulation
* ------------------------------------------------------------ */
%include <pyerrors.swg>
/* ------------------------------------------------------------
* The runtime part