Skip to content

Commit dae4bca

Browse files
author
Sam Hatchett
committed
Revert "Merge pull request #96 from aerispaha/swig4.3-error-code-fix"
This reverts commit c85c40b, reversing changes made to f71869a.
1 parent c85c40b commit dae4bca

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

owa-epanet/wrapper/toolkit.i

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,6 @@
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);

0 commit comments

Comments
 (0)