Add a function to create a value reference wrapper.

This commit is contained in:
2018-04-24 15:22:17 -07:00
parent ee76d39f38
commit 735e8715a8
2 changed files with 34 additions and 0 deletions

View File

@@ -72,5 +72,13 @@ libab_result libab_instantiate_basetype(libab_basetype* to_instantiate,
* @return the result of the instantiation.
*/
libab_result libab_create_table(libab_ref* into, libab_ref* parent);
/**
* Allocates a new reference counted value with the given type and data.
* @param into the reference to store the allocated data into.
* @param data the type-specific data this value holds.
* @param type the type to give the value.
* @return the result of necessary allocations.
*/
libab_result libab_create_value(libab_ref* into, void* data, libab_ref* type);
#endif