@@ -1052,8 +1052,13 @@ CDataType_from_param_impl(PyObject *type, PyTypeObject *cls, PyObject *value)
1052
1052
return NULL ;
1053
1053
}
1054
1054
if (as_parameter ) {
1055
+ if (_Py_EnterRecursiveCall (" while processing _as_parameter_" )) {
1056
+ Py_DECREF (as_parameter );
1057
+ return NULL ;
1058
+ }
1055
1059
value = CDataType_from_param_impl (type , cls , as_parameter );
1056
1060
Py_DECREF (as_parameter );
1061
+ _Py_LeaveRecursiveCall ();
1057
1062
return value ;
1058
1063
}
1059
1064
PyErr_Format (PyExc_TypeError ,
@@ -1843,8 +1848,13 @@ c_wchar_p_from_param_impl(PyObject *type, PyTypeObject *cls, PyObject *value)
1843
1848
return NULL ;
1844
1849
}
1845
1850
if (as_parameter ) {
1851
+ if (_Py_EnterRecursiveCall (" while processing _as_parameter_" )) {
1852
+ Py_DECREF (as_parameter );
1853
+ return NULL ;
1854
+ }
1846
1855
value = c_wchar_p_from_param_impl (type , cls , as_parameter );
1847
1856
Py_DECREF (as_parameter );
1857
+ _Py_LeaveRecursiveCall ();
1848
1858
return value ;
1849
1859
}
1850
1860
PyErr_Format (PyExc_TypeError ,
@@ -1927,8 +1937,13 @@ c_char_p_from_param_impl(PyObject *type, PyTypeObject *cls, PyObject *value)
1927
1937
return NULL ;
1928
1938
}
1929
1939
if (as_parameter ) {
1940
+ if (_Py_EnterRecursiveCall (" while processing _as_parameter_" )) {
1941
+ Py_DECREF (as_parameter );
1942
+ return NULL ;
1943
+ }
1930
1944
value = c_char_p_from_param_impl (type , cls , as_parameter );
1931
1945
Py_DECREF (as_parameter );
1946
+ _Py_LeaveRecursiveCall ();
1932
1947
return value ;
1933
1948
}
1934
1949
PyErr_Format (PyExc_TypeError ,
@@ -2079,8 +2094,13 @@ c_void_p_from_param_impl(PyObject *type, PyTypeObject *cls, PyObject *value)
2079
2094
return NULL ;
2080
2095
}
2081
2096
if (as_parameter ) {
2097
+ if (_Py_EnterRecursiveCall (" while processing _as_parameter_" )) {
2098
+ Py_DECREF (as_parameter );
2099
+ return NULL ;
2100
+ }
2082
2101
value = c_void_p_from_param_impl (type , cls , as_parameter );
2083
2102
Py_DECREF (as_parameter );
2103
+ _Py_LeaveRecursiveCall ();
2084
2104
return value ;
2085
2105
}
2086
2106
PyErr_Format (PyExc_TypeError ,
@@ -2447,9 +2467,9 @@ PyCSimpleType_from_param_impl(PyObject *type, PyTypeObject *cls,
2447
2467
return NULL ;
2448
2468
}
2449
2469
value = PyCSimpleType_from_param_impl (type , cls , as_parameter );
2450
- _Py_LeaveRecursiveCall ();
2451
2470
Py_DECREF (as_parameter );
2452
2471
Py_XDECREF (exc );
2472
+ _Py_LeaveRecursiveCall ();
2453
2473
return value ;
2454
2474
}
2455
2475
if (exc ) {
0 commit comments