| 236 | |
| 237 | ~varfunc() { Py_XDECREF(args); } |
| 238 | rettype call(const char *funcname, PyObject *func, PyObject *global_handle, |
| 239 | ExceptionHandler exHandle) |
| 240 | { |
| 241 | if(!func || !PyCallable_Check(func) || !args) |
| 242 | { |
| 243 | HandleCallbackFailure(global_handle, exHandle); |
| 244 | return rettype(); |
| 245 | } |
| 246 | |
| 247 | ProcessDecRefQueue(); |
| 248 | |
| 249 | PyObject *result = PyObject_Call(func, args, 0); |
| 250 | |
| 251 | Py_DECREF(args); |
| 252 | |
| 253 | if(result == NULL) |
| 254 | { |
| 255 | HandleCallbackFailure(global_handle, exHandle); |
| 256 | return rettype(); |
| 257 | } |
| 258 | |
| 259 | return get_return<rettype>(funcname, result, global_handle, exHandle); |
| 260 | } |
| 261 | |
| 262 | int currentarg = 0; |
| 263 | PyObject *args; |
no test coverage detected