3#ifndef __NUITKA_PRINTING_H__
4#define __NUITKA_PRINTING_H__
9extern bool PRINT_NEW_LINE(
void);
10extern bool PRINT_ITEM(PyObject *
object);
11extern bool PRINT_ITEM_LINE(PyObject *
object);
12extern bool PRINT_STRING(
char const *str);
13extern bool PRINT_STRING_W(
wchar_t const *str);
14extern bool PRINT_FORMAT(
char const *fmt, ...);
15extern bool PRINT_ITEM_TO(PyObject *file, PyObject *
object);
16extern bool PRINT_NEW_LINE_TO(PyObject *file);
18extern PyObject *GET_STDOUT(
void);
19extern PyObject *GET_STDERR(
void);
22extern void FLUSH_STDOUT(
void);
23extern void FLUSH_STDERR(
void);
30extern void PRINT_REFCOUNT(PyObject *
object);
35#if PYTHON_VERSION < 0x300
36extern void PRINT_TRACEBACK(PyTracebackObject *traceback);
40extern void _PRINT_EXCEPTION3(PyObject *exception_type, PyObject *exception_value, PyTracebackObject *exception_tb);
41extern void _PRINT_EXCEPTION1(PyObject *exception_value);
43#if PYTHON_VERSION < 0x3c0
44#define PRINT_EXCEPTION(exception_type, exception_value, exception_tb) \
45 _PRINT_EXCEPTION3(exception_type, exception_value, exception_tb)
46#define PRINT_EXCEPTION_STATE(exception_state) \
47 _PRINT_EXCEPTION3((exception_state)->exception_type, (exception_state)->exception_value, \
48 (exception_state)->exception_tb)
50#define PRINT_EXCEPTION(exception_type, exception_value, exception_tb) _PRINT_EXCEPTION1(exception_value)
51#define PRINT_EXCEPTION_STATE(exception_state) _PRINT_EXCEPTION1((exception_state)->exception_value)
55extern void PRINT_CURRENT_EXCEPTION(
void);
58extern void PRINT_PUBLISHED_EXCEPTION(
void);
61extern bool PRINT_REPR(PyObject *
object);
64extern bool PRINT_NULL(
void);
67extern bool PRINT_TYPE(PyObject *
object);