Create a new creation function for new initialization type.

This commit is contained in:
2018-06-02 20:56:30 -07:00
parent cbd57f2585
commit 9b575916ff
2 changed files with 40 additions and 0 deletions

View File

@@ -115,6 +115,18 @@ libab_result libab_create_function_tree(libab_ref* into,
void (*free_function)(void*),
libab_tree* tree,
libab_ref* scope);
/**
* Allocates a function that uses a given behavior to run.
* @param into the reference into which to store the new function.
* @param free_function the free function used to free function instances.
* @param behavior the behavior that dictates what the function does.
* @param scope the scope in which this function was declared.
* @return libab_result the result of any necessary allocations.
*/
libab_result libab_create_function_behavior(libab_ref* into,
void (*free_function)(void*),
libab_behavior* behavior,
libab_ref* scope);
/**
* Creates a function list object, storing it in to the given reference.
* @param into the reference to store into.