Moved function doc from error.h to error.c
This commit is contained in:
parent
4b406b2a99
commit
6eea8a60e0
2 changed files with 11 additions and 11 deletions
|
|
@ -39,6 +39,12 @@ cinelerra_error_tls_init (void)
|
|||
pthread_key_create (&cinelerra_error_tls, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set error state for the current thread.
|
||||
* If the error state of the current thread was cleared, then set it, else preserve the old state.
|
||||
* @param err name of the error with 'CINELERRA_ERROR_' prefix (example: CINELERRA_ERROR_NO_MEMORY)
|
||||
* @return old state, that is NULL for success, when the state was cleared and a pointer to a pending error when the error state was already set
|
||||
*/
|
||||
const char*
|
||||
cinelerra_error_set (const char * nerr)
|
||||
{
|
||||
|
|
@ -52,6 +58,11 @@ cinelerra_error_set (const char * nerr)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get and clear current error state.
|
||||
* This function clears the error state, if it needs to be reused, one has to store it in a temporary variable.
|
||||
* @return pointer to any pending error of this thread, NULL if no error is pending
|
||||
*/
|
||||
const char*
|
||||
cinelerra_error ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,20 +67,9 @@ const char* CINELERRA_ERROR_##err = "CINELERRA_ERROR_" #err ":" msg
|
|||
(({ERROR (flag, "%s", strchr(CINELERRA_ERROR_##err, ':')+1);}), \
|
||||
cinelerra_error_set(CINELERRA_ERROR_##err))
|
||||
|
||||
/**
|
||||
* Set error state for the current thread.
|
||||
* If the error state of the current thread was cleared, then set it, else preserve the old state.
|
||||
* @param err name of the error with 'CINELERRA_ERROR_' prefix (example: CINELERRA_ERROR_NO_MEMORY)
|
||||
* @return old state, that is NULL for success, when the state was cleared and a pointer to a pending error when the error state was already set
|
||||
*/
|
||||
const char*
|
||||
cinelerra_error_set (const char * err);
|
||||
|
||||
/**
|
||||
* Get and clear current error state.
|
||||
* This function clears the error state, if it needs to be reused, one has to store it in a temporary variable.
|
||||
* @return pointer to any pending error of this thread, NULL if no error is pending
|
||||
*/
|
||||
const char*
|
||||
cinelerra_error ();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue