*/
-#ifndef HASHKIT_TYPES_H
-#define HASHKIT_TYPES_H
-
-#ifdef __cplusplus
-
-extern "C" {
-#endif
+#pragma once
typedef enum {
HASHKIT_SUCCESS,
HASHKIT_MAXIMUM_RETURN /* Always add new error code before */
} hashkit_return_t;
+static inline bool hashkit_success(const hashkit_return_t rc)
+{
+ return (rc == HASHKIT_SUCCESS);
+}
+
+static inline bool hashkit_failed(const hashkit_return_t rc)
+{
+ return (rc != HASHKIT_SUCCESS);
+}
+
typedef enum {
HASHKIT_HASH_DEFAULT= 0, // hashkit_one_at_a_time()
HASHKIT_HASH_MD5,
HASHKIT_DISTRIBUTION_MAX /* Always add new values before this. */
} hashkit_distribution_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
typedef struct hashkit_st hashkit_st;
#ifdef __cplusplus
}
#endif
-
-#endif /* HASHKIT_TYPES_H */