pystrhex.h 849 B

12345678910111213141516171819202122
  1. #ifndef Py_STRHEX_H
  2. #define Py_STRHEX_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifndef Py_LIMITED_API
  7. /* Returns a str() containing the hex representation of argbuf. */
  8. PyAPI_FUNC(PyObject*) _Py_strhex(const char* argbuf, const Py_ssize_t arglen);
  9. /* Returns a bytes() containing the ASCII hex representation of argbuf. */
  10. PyAPI_FUNC(PyObject*) _Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen);
  11. /* These variants include support for a separator between every N bytes: */
  12. PyAPI_FUNC(PyObject*) _Py_strhex_with_sep(const char* argbuf, const Py_ssize_t arglen, const PyObject* sep, const int bytes_per_group);
  13. PyAPI_FUNC(PyObject*) _Py_strhex_bytes_with_sep(const char* argbuf, const Py_ssize_t arglen, const PyObject* sep, const int bytes_per_group);
  14. #endif /* !Py_LIMITED_API */
  15. #ifdef __cplusplus
  16. }
  17. #endif
  18. #endif /* !Py_STRHEX_H */