forgot returns in macros

I think that might be the culprit for the segmentation fault in Nix
(see #44). Chances are good, because the when I fixed the problem, I
bypassed those faulty macros.
This commit is contained in:
Christian Burger 2022-05-27 14:16:12 +02:00
parent c6218e9acc
commit 71aac290c1

View file

@ -11,25 +11,25 @@
#include <ncursesw/cursesw.h> #include <ncursesw/cursesw.h>
#ifdef addnwstr #ifdef addnwstr
inline int UNDEF(addnwstr)(const wchar_t *wstr, int n) { addnwstr(wstr, n); } inline int UNDEF(addnwstr)(const wchar_t *wstr, int n) { return addnwstr(wstr, n); }
#undef addnwstr #undef addnwstr
#define addnwstr UNDEF(addnwstr) #define addnwstr UNDEF(addnwstr)
#endif #endif
#ifdef add_wch #ifdef add_wch
inline int UNDEF(add_wch)(const cchar_t *character) { add_wch(character); } inline int UNDEF(add_wch)(const cchar_t *character) { return add_wch(character); }
#undef add_wch #undef add_wch
#define add_wch UNDEF(add_wch) #define add_wch UNDEF(add_wch)
#endif #endif
#ifdef ins_wch #ifdef ins_wch
inline int UNDEF(ins_wch)(cchar_t *character) { ins_wch(character); } inline int UNDEF(ins_wch)(cchar_t *character) { return ins_wch(character); }
#undef ins_wch #undef ins_wch
#define ins_wch UNDEF(ins_wch) #define ins_wch UNDEF(ins_wch)
#endif #endif
#ifdef get_wch #ifdef get_wch
inline int UNDEF(get_wch)(wint_t *character) { get_wch(character); } inline int UNDEF(get_wch)(wint_t *character) { return get_wch(character); }
#undef get_wch #undef get_wch
#define get_wch UNDEF(get_wch) #define get_wch UNDEF(get_wch)
#endif #endif