| 2645 | } |
| 2646 | |
| 2647 | SWIGINTERN Py_hash_t |
| 2648 | SWIG_PyNumber_AsPyHash(PyObject *obj) { |
| 2649 | Py_hash_t result = -1; |
| 2650 | #if PY_VERSION_HEX < 0x03020000 |
| 2651 | if (PyInt_Check(obj)) |
| 2652 | result = PyInt_AsLong(obj); |
| 2653 | else if (PyLong_Check(obj)) |
| 2654 | result = PyLong_AsLong(obj); |
| 2655 | #else |
| 2656 | if (PyNumber_Check(obj)) |
| 2657 | result = PyNumber_AsSsize_t(obj, NULL); |
| 2658 | #endif |
| 2659 | else |
| 2660 | PyErr_Format(PyExc_TypeError, "Wrong type for hash function"); |
| 2661 | return PyErr_Occurred() ? -1 : result; |
| 2662 | } |
| 2663 | |
| 2664 | SWIGINTERN int |
| 2665 | SwigPyBuiltin_BadInit(PyObject *self, PyObject *SWIGUNUSEDPARM(args), PyObject *SWIGUNUSEDPARM(kwds)) { |
no outgoing calls
no test coverage detected