[python] dump eliminated macros

This commit is contained in:
nick black 2021-11-19 05:37:33 -05:00
parent 03a03ca22c
commit ce25472f50
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -61,23 +61,14 @@ PyInit_notcurses(void)
// if this bit is set, we are *not* using the default background color
GNU_PY_CHECK_INT(PyModule_AddIntMacro(py_module, NC_BGDEFAULT_MASK));
// if this bit is set, we are *not* using the default foreground color
GNU_PY_CHECK_INT(PyModule_AddIntMacro(py_module, NC_FGDEFAULT_MASK));
// extract these bits to get the background RGB value
GNU_PY_CHECK_INT(PyModule_AddIntMacro(py_module, NC_BG_RGB_MASK));
// extract these bits to get the foreground RGB value
GNU_PY_CHECK_INT(PyModule_AddIntMacro(py_module, NC_FG_RGB_MASK));
// if this bit *and* NC_BGDEFAULT_MASK are set, we're using a
// palette-indexed background color
GNU_PY_CHECK_INT(PyModule_AddIntMacro(py_module, NC_BG_PALETTE));
GNU_PY_CHECK_INT(PyModule_AddIntMacro(py_module, NCPALETTESIZE));
// if this bit *and* CELL_FGDEFAULT_MASK are set, we're using a
// palette-indexed foreground color
GNU_PY_CHECK_INT(PyModule_AddIntMacro(py_module, NC_FG_PALETTE));
// extract these bits to get the background alpha mask
GNU_PY_CHECK_INT(PyModule_AddIntMacro(py_module, NC_BG_ALPHA_MASK));
// extract these bits to get the foreground alpha mask
GNU_PY_CHECK_INT(PyModule_AddIntMacro(py_module, NC_FG_ALPHA_MASK));
PyObject *traceback_module CLEANUP_PY_OBJ = GNU_PY_CHECK(PyImport_ImportModule("traceback"));
traceback_format_exception = GNU_PY_CHECK(PyObject_GetAttrString(traceback_module, "format_exception"));