fixes for swigrun example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7945 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5aada71816
commit
e52708c27f
2 changed files with 44 additions and 0 deletions
|
|
@ -27,6 +27,8 @@ typedef struct swig_const_info {
|
||||||
swig_type_info **ptype;
|
swig_type_info **ptype;
|
||||||
} swig_const_info;
|
} swig_const_info;
|
||||||
|
|
||||||
|
<<<<<<< pyapi.swg
|
||||||
|
=======
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
|
|
@ -75,6 +77,7 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
>>>>>>> 1.13
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if 0
|
#if 0
|
||||||
{ /* cc-mode */
|
{ /* cc-mode */
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,47 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Safe Py_None and Py_Void accessors */
|
||||||
|
|
||||||
|
SWIGRUNTIME PyObject *
|
||||||
|
SWIG_Py_None(void)
|
||||||
|
{
|
||||||
|
static PyObject *none = 0;
|
||||||
|
if (!none) {
|
||||||
|
none = Py_BuildValue("");
|
||||||
|
Py_DECREF(none);
|
||||||
|
}
|
||||||
|
return none;
|
||||||
|
}
|
||||||
|
|
||||||
|
SWIGRUNTIMEINLINE PyObject *
|
||||||
|
SWIG_Py_Void(void)
|
||||||
|
{
|
||||||
|
PyObject *none = SWIG_Py_None();
|
||||||
|
Py_INCREF(none);
|
||||||
|
return none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Append a value to the result obj */
|
||||||
|
|
||||||
|
SWIGINTERN PyObject*
|
||||||
|
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
|
||||||
|
if (!result) {
|
||||||
|
result = obj;
|
||||||
|
} else if (result == SWIG_Py_None()) {
|
||||||
|
Py_DECREF(result);
|
||||||
|
result = obj;
|
||||||
|
} else {
|
||||||
|
if (!PyList_Check(result)) {
|
||||||
|
PyObject *o2 = result;
|
||||||
|
result = PyList_New(1);
|
||||||
|
PyList_SetItem(result, 0, o2);
|
||||||
|
}
|
||||||
|
PyList_Append(result,obj);
|
||||||
|
Py_DECREF(obj);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* PySwigClientData */
|
/* PySwigClientData */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue