]> granicus.if.org Git - python/commitdiff
Fixed declarations of _Py_DumpTraceback() and _Py_DumpTracebackThreads().
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 1 May 2016 10:07:14 +0000 (13:07 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 1 May 2016 10:07:14 +0000 (13:07 +0300)
1  2 
Include/traceback.h

index f767ea84cdd18a040a2a12ff256e5626c2634394,c3ecbe296f900f7516287fe77788269350f86f0f..dbc769bb82311d22a22b99817fd66aae24a0434b
@@@ -62,54 -60,12 +62,54 @@@ PyAPI_FUNC(void) _Py_DumpTraceback
     only write the traceback of the first 100 threads: write "..." if there are
     more threads.
  
 +   If current_tstate is NULL, the function tries to get the Python thread state
 +   of the current thread. It is not an error if the function is unable to get
 +   the current Python thread state.
 +
 +   If interp is NULL, the function tries to get the interpreter state from
 +   the current Python thread state, or from
 +   _PyGILState_GetInterpreterStateUnsafe() in last resort.
 +
 +   It is better to pass NULL to interp and current_tstate, the function tries
 +   different options to retrieve these informations.
 +
     This function is signal safe. */
  
- PyAPI_DATA(const char*) _Py_DumpTracebackThreads(
+ PyAPI_FUNC(const char*) _Py_DumpTracebackThreads(
 -    int fd, PyInterpreterState *interp,
 -    PyThreadState *current_thread);
 +    int fd,
 +    PyInterpreterState *interp,
 +    PyThreadState *current_tstate);
 +
 +#ifndef Py_LIMITED_API
 +
 +/* Write a Unicode object into the file descriptor fd. Encode the string to
 +   ASCII using the backslashreplace error handler.
 +
 +   Do nothing if text is not a Unicode object. The function accepts Unicode
 +   string which is not ready (PyUnicode_WCHAR_KIND).
 +
 +   This function is signal safe. */
 +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);
 +
 +/* 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 */
  
  #ifdef __cplusplus
  }