1#ifndef Py_INTERNAL_STRHEX_H
2#define Py_INTERNAL_STRHEX_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7#ifndef Py_BUILD_CORE
8#  error "this header requires Py_BUILD_CORE define"
9#endif
10
11// Returns a str() containing the hex representation of argbuf.
12PyAPI_FUNC(PyObject*) _Py_strhex(const
13    char* argbuf,
14    const Py_ssize_t arglen);
15
16// Returns a bytes() containing the ASCII hex representation of argbuf.
17PyAPI_FUNC(PyObject*) _Py_strhex_bytes(
18    const char* argbuf,
19    const Py_ssize_t arglen);
20
21// These variants include support for a separator between every N bytes:
22PyAPI_FUNC(PyObject*) _Py_strhex_with_sep(
23    const char* argbuf,
24    const Py_ssize_t arglen,
25    PyObject* sep,
26    const int bytes_per_group);
27PyAPI_FUNC(PyObject*) _Py_strhex_bytes_with_sep(
28    const char* argbuf,
29    const Py_ssize_t arglen,
30    PyObject* sep,
31    const int bytes_per_group);
32
33#ifdef __cplusplus
34}
35#endif
36#endif /* !Py_INTERNAL_STRHEX_H */
37