Switch values to having their data refcounted separately.
This allows for values to be "cast" and have a different type, while still referencing the same data.
This commit is contained in:
@@ -80,7 +80,15 @@ libab_result libab_create_table(libab_ref* into, libab_ref* parent);
|
||||
* @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);
|
||||
libab_result libab_create_value_ref(libab_ref* into, libab_ref* data, libab_ref* type);
|
||||
/**
|
||||
* 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_raw(libab_ref* into, void* data, libab_ref* type);
|
||||
/**
|
||||
* Creates a function list object, storing it in to the given reference.
|
||||
* @param into the reference to store into.
|
||||
|
||||
Reference in New Issue
Block a user