Function wyrd_create
Defined in File api.h
Function Documentation
-
wyrd_error_t wyrd_create(struct wyrd_api **api)
Create an API instance. Other functions require this API instance to work, so calling this function is the first thing you should do.
Before calling, api should be initialized to NULL. After calling, api should be non-NULL and WYRD_ERR_SUCCESS should be returned.
If you call this function with an already initialized api instance, that instance will be destroyed and a new instance created.
- Parameters
api – [inout] The value will be set to an initialized API instance.
- Return values
WYRD_ERR_SUCCESS – On success.
WYRD_ERR_INVALID_VALUE – If any of the parameters are invalid, such as e.g. NULL when they should not be, etc.