@???@
More...
#include <stddef.h>
#include "toy_common.h"
Go to the source code of this file.
|
| TOY_API void | Toy_setRefFunctionAllocatorFn (Toy_RefFunctionAllocatorFn) |
| | Conforms to and is invoked by Toy's memory API, and generally shouldn't be used.
|
| |
| TOY_API Toy_RefFunction * | Toy_createRefFunction (const void *data, size_t length) |
| | Returns a new Toy_RefFunction, containing a copy of data, or NULL on error. This function also sets the returned refFunction's reference counter to 1.
|
| |
| TOY_API void | Toy_deleteRefFunction (Toy_RefFunction *refFunction) |
| | Reduces the refFunction's reference counter by 1 and, if it reaches 0, frees the memory.
|
| |
| TOY_API int | Toy_countRefFunction (Toy_RefFunction *refFunction) |
| | Returns the total number of references to refFunction, for debugging.
|
| |
| TOY_API size_t | Toy_lengthRefFunction (Toy_RefFunction *refFunction) |
| | Returns the length of the underlying bytecode of refFunction.
|
| |
| TOY_API Toy_RefFunction * | Toy_copyRefFunction (Toy_RefFunction *refFunction) |
| | Increases the reference counter of refFunction by 1, before returning the given pointer.
|
| |
| TOY_API Toy_RefFunction * | Toy_deepCopyRefFunction (Toy_RefFunction *refFunction) |
| | Behaves identically to Toy_copyRefFunction, except that it explicitly preforms a deep copy of the internal memory. Using this function should be done carefully, as it incurs a performance penalty that negates the benefit of this module.
|
| |
◆ Toy_RefFunction
◆ Toy_RefFunctionAllocatorFn
| void *(* Toy_RefFunctionAllocatorFn)(void *pointer, size_t oldSize, size_t newSize) |
◆ Toy_copyRefFunction()
Increases the reference counter of refFunction by 1, before returning the given pointer.
- Parameters
-
- Returns
◆ Toy_countRefFunction()
Returns the total number of references to refFunction, for debugging.
- Parameters
-
- Returns
◆ Toy_createRefFunction()
| Toy_RefFunction * Toy_createRefFunction |
( |
const void * |
data, |
|
|
size_t |
length |
|
) |
| |
Returns a new Toy_RefFunction, containing a copy of data, or NULL on error. This function also sets the returned refFunction's reference counter to 1.
- Parameters
-
- Returns
◆ Toy_deepCopyRefFunction()
Behaves identically to Toy_copyRefFunction, except that it explicitly preforms a deep copy of the internal memory. Using this function should be done carefully, as it incurs a performance penalty that negates the benefit of this module.
- Parameters
-
- Returns
◆ Toy_deleteRefFunction()
Reduces the refFunction's reference counter by 1 and, if it reaches 0, frees the memory.
- Parameters
-
◆ Toy_lengthRefFunction()
Returns the length of the underlying bytecode of refFunction.
- Parameters
-
- Returns
◆ Toy_setRefFunctionAllocatorFn()
Conforms to and is invoked by Toy's memory API, and generally shouldn't be used.
- Parameters
-
| Toy_RefFunctionAllocatorFn | |