summaryrefslogtreecommitdiff
path: root/Include/traceback.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-03-23 10:32:26 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-03-23 10:32:26 +0100
commita4a4b0cb3783d1339c3cdb0874f9f958a8225407 (patch)
treec45277796be3c02b1fc6c3336c35879d48cce264 /Include/traceback.h
parent61adfb874498d243f5bea2da569368f2b8b392a2 (diff)
downloadcpython-a4a4b0cb3783d1339c3cdb0874f9f958a8225407.tar.gz
Issue #23848: Expose _Py_DumpHexadecimal()
This function will be reused by faulthandler.
Diffstat (limited to 'Include/traceback.h')
-rw-r--r--Include/traceback.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/Include/traceback.h b/Include/traceback.h
index 76e169a312..f767ea84cd 100644
--- a/Include/traceback.h
+++ b/Include/traceback.h
@@ -94,7 +94,20 @@ PyAPI_FUNC(void) _Py_DumpASCII(int fd, PyObject *text);
/* Format an integer as decimal into the file descriptor fd.
This function is signal safe. */
-PyAPI_FUNC(void) _Py_DumpDecimal(int fd, unsigned long value);
+PyAPI_FUNC(void) _Py_DumpDecimal(
+ int fd,
+ unsigned long value);
+
+/* Format an integer as hexadecimal into the file descriptor fd with at least
+ width digits.
+
+ The maximum width is sizeof(unsigned long)*2 digits.
+
+ This function is signal safe. */
+PyAPI_FUNC(void) _Py_DumpHexadecimal(
+ int fd,
+ unsigned long value,
+ Py_ssize_t width);
#endif /* !Py_LIMITED_API */