notcurses_stats_alloc() everywhere

pull/1050/head
nick black 4 years ago
parent bf28170c61
commit c6c157a5ad
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -9,7 +9,7 @@ rearrangements of Notcurses.
these processes.
* `notcurses_render_to_buffer()` has been added, allowing user control of
the process of writing frames out to the terminal.
* `notcurses_stats_create()` has been added, to allocate an `ncstats` object.
* `notcurses_stats_alloc()` has been added, to allocate an `ncstats` object.
`notcurses_reset_stats()` has been renamed `notcurses_stats_reset()`.
* 1.7.5 (2020-09-29)

@ -2851,7 +2851,7 @@ typedef struct ncstats {
// Allocate an ncstats object. Use this rather than allocating your own, since
// future versions of Notcurses might enlarge this structure.
ncstats* notcurses_stats_create(const struct notcurses* nc);
ncstats* notcurses_stats_alloc(const struct notcurses* nc);
// Acquire an atomic snapshot of the notcurses object's stats.
void notcurses_stats(const struct notcurses* nc, ncstats* stats);

@ -1121,7 +1121,7 @@ typedef struct ncstats {
// Allocate an ncstats object. Use this rather than allocating your own, since
// future versions of Notcurses might enlarge this structure.
API ncstats* notcurses_stats_create(const struct notcurses* nc);
API ncstats* notcurses_stats_alloc(const struct notcurses* nc);
// Acquire an atomic snapshot of the notcurses object's stats.
API void notcurses_stats(const struct notcurses* nc, ncstats* stats);

@ -24,7 +24,8 @@
// notcurses_refresh
// notcurses_render
// notcurses_render_to_file
// notcurses_reset_stats
// notcurses_stats_alloc
// notcurses_stats_reset
// notcurses_stats
// notcurses_stdplane
// notcurses_stdplane_const

@ -310,7 +310,7 @@ typedef struct notcurses {
int cursorx; // care, otherwise moved here after each render.
ncstats stats; // some statistics across the lifetime of the notcurses ctx
ncstats stashstats; // cumulative stats, unaffected by notcurses_reset_stats()
ncstats stashstats; // cumulative stats, unaffected by notcurses_stats_reset()
int truecols; // true number of columns in the physical rendering area.
// used only to see if output motion takes us to the next

@ -715,7 +715,7 @@ void notcurses_stats(const notcurses* nc, ncstats* stats){
memcpy(stats, &nc->stats, sizeof(*stats));
}
ncstats* notcurses_stats_create(const notcurses* nc __attribute__ ((unused))){
ncstats* notcurses_stats_alloc(const notcurses* nc __attribute__ ((unused))){
return malloc(sizeof(ncstats));
}

Loading…
Cancel
Save