notcurses: update to 2.2.8.

This commit is contained in:
mobinmob 2021-04-20 23:16:51 +03:00 committed by Érico Nogueira Rolim
parent bd98b62d86
commit b19d5f629f
2 changed files with 3 additions and 69 deletions

View file

@ -1,66 +0,0 @@
From da2a897544b9d239515b85ed31c8db4d90d23883 Mon Sep 17 00:00:00 2001
From: nick black <dankamongmen@gmail.com>
Date: Wed, 14 Apr 2021 10:04:28 -0400
Subject: [PATCH] fix unintended cell abi breakage #1532
cell_release() and cell_duplicate() were deprecated in 2.2.6,
but replaced with static inlines. this breaks the abi, forcing
recompiles from client programs. restore them as exported
functions.
---
include/notcurses/notcurses.h | 10 ++--------
src/lib/render.c | 9 +++++++++
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h
index aece8cb6d..9d98ea19f 100644
--- a/include/notcurses/notcurses.h
+++ b/include/notcurses/notcurses.h
@@ -677,18 +677,12 @@ cell_prime(struct ncplane* n, nccell* c, const char* gcluster,
// failure, and 0 on success.
API int nccell_duplicate(struct ncplane* n, nccell* targ, const nccell* c);
-__attribute__ ((deprecated)) static inline int
-cell_duplicate(struct ncplane* n, nccell* targ, const nccell* c){
- return nccell_duplicate(n, targ, c);
-}
+__attribute__ ((deprecated)) API int cell_duplicate(struct ncplane* n, nccell* targ, const nccell* c);
// Release resources held by the nccell 'c'.
API void nccell_release(struct ncplane* n, nccell* c);
-__attribute__ ((deprecated)) static inline void
-cell_release(struct ncplane* n, nccell* c){
- nccell_release(n, c);
-}
+__attribute__ ((deprecated)) API void cell_release(struct ncplane* n, nccell* c);
#define NCSTYLE_MASK 0x03ffu
#define NCSTYLE_STANDOUT 0x0080u
diff --git a/src/lib/render.c b/src/lib/render.c
index ad95cd878..e1334416f 100644
--- a/src/lib/render.c
+++ b/src/lib/render.c
@@ -175,6 +175,11 @@ void nccell_release(ncplane* n, nccell* c){
pool_release(&n->pool, c);
}
+// FIXME deprecated, goes away in abi3
+void cell_release(ncplane* n, nccell* c){
+ nccell_release(n, c);
+}
+
// Duplicate one cell onto another when they share a plane. Convenience wrapper.
int nccell_duplicate(ncplane* n, nccell* targ, const nccell* c){
if(cell_duplicate_far(&n->pool, targ, n, c) < 0){
@@ -184,6 +189,10 @@ int nccell_duplicate(ncplane* n, nccell* targ, const nccell* c){
return 0;
}
+int cell_duplicate(struct ncplane* n, nccell* targ, const nccell* c){
+ return nccell_duplicate(n, targ, c);
+}
+
// Emit fchannel with RGB changed to contrast effectively against bchannel.
static uint32_t
highcontrast(uint32_t bchannel){

View file

@ -1,7 +1,7 @@
# Template file for 'notcurses'
pkgname=notcurses
version=2.2.6
revision=2
version=2.2.8
revision=1
build_style=cmake
configure_args="-DUSE_STATIC=ON $(vopt_bool man USE_PANDOC)"
hostmakedepends="pkg-config $(vopt_if man pandoc)"
@ -14,7 +14,7 @@ license="Apache-2.0"
homepage="https://nick-black.com/dankwiki/index.php/Notcurses"
changelog="https://raw.githubusercontent.com/dankamongmen/notcurses/master/NEWS.md"
distfiles="https://github.com/dankamongmen/notcurses/archive/v${version}.tar.gz"
checksum=0507e507f9843a494aa66f31e419add5fbdbceb8fbc9345f3e6d4b55ed8a89d9
checksum=dc744f6a11bf8ca81dc8a73f56c4d9021cf4d56ef89a9a658974dff7984df376
patch_args=-Np1
build_options="man"