From a591e11c96e2fc7094d97e3dccffa3e251a08a7f Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 28 Sep 2020 05:57:30 -0400 Subject: [PATCH] retain nctablet_ncplane() as deprecated alias --- NEWS.md | 3 ++- include/notcurses/notcurses.h | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 7efaa8295..d235044f2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,7 +3,8 @@ rearrangements of Notcurses. * 1.7.5 (not yet released) * `ncreel_destroy()` now returns `void` rather than `int`. - * `nctablet_ncplane()` has been renamed `nctablet_plane()`. + * `nctablet_ncplane()` has been renamed `nctablet_plane()`. The former name + has been retained as a (deprecated) alias, to be removed in the near future. * 1.7.4 (2020-09-20) * All `_rgb_clipped()` functions have been renamed `_rgb8_clipped()`, to diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index cf651827a..4f26c974e 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -2543,6 +2543,15 @@ API void* nctablet_userptr(struct nctablet* t); // Access the ncplane associated with nctablet 't', if one exists. API struct ncplane* nctablet_plane(struct nctablet* t); +// deprecated predecessor of nctablet_plane() +static inline struct ncplane* +nctablet_ncplane(struct nctablet* t) __attribute__ ((deprecated)); + +static inline struct ncplane* +nctablet_ncplane(struct nctablet* t){ + return nctablet_plane(t); +} + // The number of columns is one fewer, as the STRLEN expressions must leave // an extra byte open in case 'ยต' (U+00B5, 0xC2 0xB5) shows up. PREFIXCOLUMNS // is the maximum number of columns used by a mult == 1000 (standard)