libobs/callback: Add calldata_create and calldata_destroy

These functions aren't particularly useful in C/C++, but these functions
are necessary to allow creating/destroying a calldata_t object via
script.
This commit is contained in:
jp9000 2018-01-18 08:53:19 -08:00
parent c9c7dc5748
commit e3d19c5b16

View File

@ -88,6 +88,17 @@ static inline void calldata_clear(struct calldata *data)
}
}
static inline calldata_t *calldata_create(void)
{
return (calldata_t*)bzalloc(sizeof(struct calldata));
}
static inline void calldata_destroy(calldata_t *cd)
{
calldata_free(cd);
bfree(cd);
}
/* ------------------------------------------------------------------------- */
/* NOTE: 'get' functions return true only if parameter exists, and is the
* same type. They return false otherwise. */