summaryrefslogtreecommitdiffstats
path: root/include/zix
diff options
context:
space:
mode:
Diffstat (limited to 'include/zix')
-rw-r--r--include/zix/common.h29
1 files changed, 6 insertions, 23 deletions
diff --git a/include/zix/common.h b/include/zix/common.h
index eaac408..02b0f64 100644
--- a/include/zix/common.h
+++ b/include/zix/common.h
@@ -4,6 +4,8 @@
#ifndef ZIX_COMMON_H
#define ZIX_COMMON_H
+#include "zix/attributes.h"
+
#include <stdbool.h>
/**
@@ -26,29 +28,10 @@ typedef enum {
ZIX_STATUS_REACHED_END
} ZixStatus;
-static inline const char*
-zix_strerror(const ZixStatus status)
-{
- switch (status) {
- case ZIX_STATUS_SUCCESS:
- return "Success";
- case ZIX_STATUS_ERROR:
- return "Unknown error";
- case ZIX_STATUS_NO_MEM:
- return "Out of memory";
- case ZIX_STATUS_NOT_FOUND:
- return "Not found";
- case ZIX_STATUS_EXISTS:
- return "Exists";
- case ZIX_STATUS_BAD_ARG:
- return "Bad argument";
- case ZIX_STATUS_BAD_PERMS:
- return "Bad permissions";
- case ZIX_STATUS_REACHED_END:
- return "Reached end";
- }
- return "Unknown error";
-}
+/// Return a string describing a status code
+ZIX_API
+const char*
+zix_strerror(ZixStatus status);
/// Function for comparing two elements
typedef int (*ZixComparator)(const void* a,