sdk: add generic X return code

This type is should be used instead of plain int for all functions
returning and X error code (that's possibly sent to the client),
in order to make return value semantics clear to the humen reader.
(for the compiler, it still will be just an int)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-05-23 13:13:08 +02:00
parent 802a581f51
commit 4cbe7e550c

View File

@ -102,6 +102,16 @@ OF THIS SOFTWARE.
typedef uint32_t ATOM; typedef uint32_t ATOM;
/* @brief generic X return code
*
* this type is should be used instead of plain int for all functions
* returning and X error code (that's possibly sent to the client),
* in order to make return value semantics clear to the humen reader.
*
* part of public SDK / driver API.
*/
typedef int XRetCode;
#ifndef TRUE #ifndef TRUE
#define TRUE 1 #define TRUE 1
#define FALSE 0 #define FALSE 0