MCPcopy Create free account
hub / github.com/apache/thrift / as_long_then_delete

Function as_long_then_delete

lib/py/src/ext/module.cpp:73–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73static inline long as_long_then_delete(PyObject* value, long default_value) {
74 ScopedPyObject scope(value);
75 long v = PyInt_AsLong(value);
76 if (INT_CONV_ERROR_OCCURRED(v)) {
77 PyErr_Clear();
78 return default_value;
79 }
80 return v;
81}
82
83template <typename T>
84static PyObject* decode_impl(PyObject* args) {

Callers 1

decode_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected