Helper function to get unicode(PyLong).encode('utf8') */
| 99 | |
| 100 | /* Helper function to get unicode(PyLong).encode('utf8') */ |
| 101 | static PyObject * |
| 102 | _PyLong_Bytes(PyObject *long_obj) { |
| 103 | PyObject *bytes; |
| 104 | PyObject *unicode = PyObject_Str(long_obj); |
| 105 | if (unicode == NULL) { |
| 106 | return NULL; |
| 107 | } |
| 108 | bytes = PyUnicode_AsUTF8String(unicode); |
| 109 | Py_DECREF(unicode); |
| 110 | return bytes; |
| 111 | } |
| 112 | |
| 113 | |
| 114 | /** |
no outgoing calls
no test coverage detected