@@ -1054,8 +1054,13 @@ CDataType_from_param_impl(PyObject *type, PyTypeObject *cls, PyObject *value)
1054
1054
return NULL ;
1055
1055
}
1056
1056
if (as_parameter ) {
1057
+ if (_Py_EnterRecursiveCall (" while processing _as_parameter_" )) {
1058
+ Py_DECREF (as_parameter );
1059
+ return NULL ;
1060
+ }
1057
1061
value = CDataType_from_param_impl (type , cls , as_parameter );
1058
1062
Py_DECREF (as_parameter );
1063
+ _Py_LeaveRecursiveCall ();
1059
1064
return value ;
1060
1065
}
1061
1066
PyErr_Format (PyExc_TypeError ,
@@ -1842,8 +1847,13 @@ c_wchar_p_from_param_impl(PyObject *type, PyTypeObject *cls, PyObject *value)
1842
1847
return NULL ;
1843
1848
}
1844
1849
if (as_parameter ) {
1850
+ if (_Py_EnterRecursiveCall (" while processing _as_parameter_" )) {
1851
+ Py_DECREF (as_parameter );
1852
+ return NULL ;
1853
+ }
1845
1854
value = c_wchar_p_from_param_impl (type , cls , as_parameter );
1846
1855
Py_DECREF (as_parameter );
1856
+ _Py_LeaveRecursiveCall ();
1847
1857
return value ;
1848
1858
}
1849
1859
PyErr_Format (PyExc_TypeError ,
@@ -1926,8 +1936,13 @@ c_char_p_from_param_impl(PyObject *type, PyTypeObject *cls, PyObject *value)
1926
1936
return NULL ;
1927
1937
}
1928
1938
if (as_parameter ) {
1939
+ if (_Py_EnterRecursiveCall (" while processing _as_parameter_" )) {
1940
+ Py_DECREF (as_parameter );
1941
+ return NULL ;
1942
+ }
1929
1943
value = c_char_p_from_param_impl (type , cls , as_parameter );
1930
1944
Py_DECREF (as_parameter );
1945
+ _Py_LeaveRecursiveCall ();
1931
1946
return value ;
1932
1947
}
1933
1948
PyErr_Format (PyExc_TypeError ,
@@ -2078,8 +2093,13 @@ c_void_p_from_param_impl(PyObject *type, PyTypeObject *cls, PyObject *value)
2078
2093
return NULL ;
2079
2094
}
2080
2095
if (as_parameter ) {
2096
+ if (_Py_EnterRecursiveCall (" while processing _as_parameter_" )) {
2097
+ Py_DECREF (as_parameter );
2098
+ return NULL ;
2099
+ }
2081
2100
value = c_void_p_from_param_impl (type , cls , as_parameter );
2082
2101
Py_DECREF (as_parameter );
2102
+ _Py_LeaveRecursiveCall ();
2083
2103
return value ;
2084
2104
}
2085
2105
PyErr_Format (PyExc_TypeError ,
@@ -2435,9 +2455,9 @@ PyCSimpleType_from_param_impl(PyObject *type, PyTypeObject *cls,
2435
2455
return NULL ;
2436
2456
}
2437
2457
value = PyCSimpleType_from_param_impl (type , cls , as_parameter );
2438
- _Py_LeaveRecursiveCall ();
2439
2458
Py_DECREF (as_parameter );
2440
2459
Py_XDECREF (exc );
2460
+ _Py_LeaveRecursiveCall ();
2441
2461
return value ;
2442
2462
}
2443
2463
if (exc ) {
0 commit comments