From 603fd770fea6270b69cd5f7672f116c35f3965be Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 10 Jul 2021 18:20:44 -0400 Subject: [PATCH] update new python for CHANNEL_RGB change --- doc/man/man3/notcurses_channels.3.md | 4 ++-- python/notcurses/channels.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/man/man3/notcurses_channels.3.md b/doc/man/man3/notcurses_channels.3.md index ea1606e7a..cfe3634a4 100644 --- a/doc/man/man3/notcurses_channels.3.md +++ b/doc/man/man3/notcurses_channels.3.md @@ -11,11 +11,11 @@ notcurses_channels - operations on notcurses channels **#include ** ```c -#define CHANNELS_RGB_INITIALIZER(fr, fg, fb, br, bg, bb) \ +#define NCCHANNELS_INITIALIZER(fr, fg, fb, br, bg, bb) \ (((((uint64_t)(fr) << 16u) + ((uint64_t)(fg) << 8u) + (uint64_t)(fb)) << 32ull) + \ (((br) << 16u) + ((bg) << 8u) + (bb)) + CELL_BGDEFAULT_MASK + CELL_FGDEFAULT_MASK) -#define CHANNEL_RGB_INITIALIZER(r, g, b) \ +#define CHANNEL_INITIALIZER(r, g, b) \ (((uint32_t)r << 16u) + ((uint32_t)g << 8u) + (b) + CELL_BGDEFAULT_MASK) ``` diff --git a/python/notcurses/channels.c b/python/notcurses/channels.c index d6d318743..d1ff2f601 100644 --- a/python/notcurses/channels.c +++ b/python/notcurses/channels.c @@ -24,7 +24,7 @@ python_ncchannels_rgb_initializer(PyObject *Py_UNUSED(self), PyObject *args) GNU_PY_CHECK_BOOL(PyArg_ParseTuple(args, "KKKKKK", &fr, &fg, &fb, &br, &bg, &bb)); - unsigned long long ncchannels = CHANNELS_RGB_INITIALIZER(fr, fg, fb, br, bg, bb); + unsigned long long ncchannels = NCCHANNELS_INITIALIZER(fr, fg, fb, br, bg, bb); return Py_BuildValue("K", ncchannels); } @@ -36,7 +36,7 @@ python_ncchannel_rgb_initializer(PyObject *Py_UNUSED(self), PyObject *args) GNU_PY_CHECK_BOOL(PyArg_ParseTuple(args, "kkk", &r, &g, &b)); - unsigned long ncchannel = CHANNEL_RGB_INITIALIZER(r, g, b); + unsigned long ncchannel = CHANNEL_INITIALIZER(r, g, b); return Py_BuildValue("k", ncchannel); } @@ -611,4 +611,4 @@ PyMethodDef ChannelsFunctions[] = { {"ncchannels_set_fg_default", (PyCFunction)python_ncchannels_set_fg_default, METH_VARARGS, "Mark the foreground ncchannel as using its default color."}, {"ncchannels_set_bg_default", (PyCFunction)python_ncchannels_set_bg_default, METH_VARARGS, "Mark the background ncchannel as using its default color."}, {NULL, NULL, 0, NULL}, -}; \ No newline at end of file +};