File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424}
2525
2626/* TYPEMAP FOR IGNORING INT ERROR CODE RETURN VALUE */
27- /*
28- This is the same logic applied in swmm toolkit to handle a breaking change
29- introduced in the version 4.3 of SWIG. Credit: karosc
30-
31- See https://github.com/karosc/swmm-python/commit/1ef854ac469c1e2df29f9bb1ed718361df79cc95
32- */
33- %header %{
34- SWIGINTERN PyObject*
35- Custom_SWIG_Python_AppendOutput (PyObject* result, PyObject* obj, int is_void) {
36- if (!result) {
37- result = obj;
38- } else if (result == Py_None) {
39- SWIG_Py_DECREF (result);
40- result = obj;
41- } else {
42- if (!PyList_Check (result)) {
43- PyObject *o2 = result;
44- result = PyList_New (1 );
45- if (result) {
46- PyList_SET_ITEM (result, 0 , o2);
47- } else {
48- SWIG_Py_DECREF (obj);
49- return o2;
50- }
51- }
52- PyList_Append (result,obj);
53- SWIG_Py_DECREF (obj);
54- }
55- return result;
56- }
57- #define SWIG_Python_AppendOutput Custom_SWIG_Python_AppendOutput
58- %}
59-
6027%typemap(out) int {
6128 $result = Py_None;
6229 Py_INCREF ($result);
You can’t perform that action at this time.
0 commit comments