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:
parent
c9c7dc5748
commit
e3d19c5b16
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user