You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
notcurses/include/ncpp
Marek Habersack 9ca8d9c9c6 Correctly cast `ncpp::Plane` to `ncplane*`
Fixes: https://github.com/dankamongmen/notcurses/issues/616

SIGSEGV was caused by an invalid cast.

Short explanation: PEBKAC

Long explanation: `Selector.hh`, `Plot.hh` and `MultiSelector.hh` did
not include `Plane.hh`, they merely declared `class Plane;` because
inclusion of `Plane.hh` would cause circular dependencies to appear and
the compiler would be unhappy.  On top of that, yours truly wrenched the
compiler's hands and caused it to believe that a pointer to `Plane` is
really a pointer to `ncplane*` which was quite a silly thing to do as
the compiler, not having included `Plane.hh` and thus not knowing full
definition of the type, wasn't able to look up the type cast operator in
`Plane`.

Don't abuse `reinterpret_cast`, kids!
4 years ago
..
internal Add C++ bindings 5 years ago
Cell.hh ncplane_translate() accept NULL dest as standard plane #408 (#411) 5 years ago
CellStyle.hh Prep for serious rusting #101 (#354) 5 years ago
Direct.hh ncpp: normalize Notcurses capitalization 4 years ago
FDPlane.hh [C++] Sync API changes 4 years ago
Menu.hh ncpp: normalize Notcurses capitalization 4 years ago
MultiSelector.hh Correctly cast `ncpp::Plane` to `ncplane*` 4 years ago
NCAlign.hh Prep for serious rusting #101 (#354) 5 years ago
NCBox.hh Prep for serious rusting #101 (#354) 5 years ago
NCKey.hh [C++] API sync 5 years ago
NCLogLevel.hh Prep for serious rusting #101 (#354) 5 years ago
NCScale.hh Prep for serious rusting #101 (#354) 5 years ago
NotCurses.hh qprefix/bprefix: use uintmax_t for decimal 4 years ago
Palette256.hh ncpp: normalize Notcurses capitalization 4 years ago
Plane.hh Correctly cast `ncpp::Plane` to `ncplane*` 4 years ago
Plot.hh Correctly cast `ncpp::Plane` to `ncplane*` 4 years ago
Reader.hh Correctly cast `ncpp::Plane` to `ncplane*` 4 years ago
Reel.hh Correctly cast `ncpp::Plane` to `ncplane*` 4 years ago
Root.hh [C++] Optionally enable throwing exceptions on errors 4 years ago
Selector.hh Correctly cast `ncpp::Plane` to `ncplane*` 4 years ago
Subproc.hh ncpp: normalize Notcurses capitalization 4 years ago
Tablet.hh Prep for serious rusting #101 (#354) 5 years ago
TabletCallback.hh Add C++ bindings 5 years ago
Utilities.hh Correctly cast `ncpp::Plane` to `ncplane*` 4 years ago
Visual.hh Correctly cast `ncpp::Plane` to `ncplane*` 4 years ago
_exceptions.hh [C++] Optionally enable throwing exceptions on errors 4 years ago
_flag_enum_operator_helpers.hh Add C++ bindings 5 years ago
_helpers.hh Add C++ bindings 5 years ago
ncpp.hh Add C++ bindings 5 years ago