summaryrefslogtreecommitdiff
path: root/src/pulp.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2018-11-26 18:37:23 -0800
committerVito Caputo <vcaputo@pengaru.com>2018-11-26 18:37:23 -0800
commitdeb34d3fb4990997101e37f54a334e3f72e77540 (patch)
tree10b468c1ac25a1ae14271fe5d740b2972ac79894 /src/pulp.h
parentbd80a482ee9e8cc7500e1d31625935f4902f78b8 (diff)
libpulp: add pulp_reset()
It's useful to be able to wipe out a pulp instance but reuse its allocations as a fresh pulp instance. This also fixes a context leak in pulp_free() by making it call pulp_reset(). (only relevant to win32 where destroy_context() does something)
Diffstat (limited to 'src/pulp.h')
-rw-r--r--src/pulp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pulp.h b/src/pulp.h
index 9d5f559..cba78e6 100644
--- a/src/pulp.h
+++ b/src/pulp.h
@@ -32,6 +32,7 @@ typedef struct pulp_mailbox_t {
int pulp_init(void);
pulp_t * pulp_new(void);
+void pulp_reset(pulp_t *pulp);
void pulp_free(pulp_t *pulp);
int pulp_tick(pulp_t *pulp, unsigned *next_tick_delay_us);
void pulp_run(pulp_t *pulp);
© All Rights Reserved