From 369602196b44c7d30af7e87d1bc04245ab3a42b3 Mon Sep 17 00:00:00 2001 From: nick black Date: Fri, 26 Nov 2021 03:27:25 -0500 Subject: [PATCH] [NEWS] ncstrwidth takeover --- NEWS.md | 3 +++ python/notcurses/misc.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 3f16397df..10d424ecb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -26,6 +26,9 @@ rearrangements of Notcurses. origin coordinates. All now interpret their `unsigned` argument as lengths rather than closing coordinates, observing the same semantics as outlined above. + * `ncstrwidth_valid()`, introduced in 2.4.1, has replaced `ncstrwidth()` + entirely, and been renamed to reflect this. For the old behavior, + simply add two `NULL`s to your `ncstrwidth()` invocations. * `ncplayer` now defaults to pixel blitting. * `NCKEY_SIGNAL` is no longer a synonym for `NCKEY_RESIZE`, but instead indicates receipt of `SIGCONT`. diff --git a/python/notcurses/misc.c b/python/notcurses/misc.c index 0ea514d57..03a26189f 100644 --- a/python/notcurses/misc.c +++ b/python/notcurses/misc.c @@ -41,7 +41,7 @@ python_ncstrwidth(PyObject *Py_UNUSED(self), PyObject *args) GNU_PY_CHECK_BOOL(PyArg_ParseTuple(args, "s", &s, NULL, NULL)); - return Py_BuildValue("i", ncstrwidth(s)); + return Py_BuildValue("i", ncstrwidth(s, NULL, NULL)); } PyMethodDef MiscFunctions[] = {