1 /* 2 * Copyright (C) 2018 Alexander Borisov 3 * 4 * Author: Alexander Borisov <borisov@lexbor.com> 5 */ 6 7 #ifndef LEXBOR_TYPES_H 8 #define LEXBOR_TYPES_H 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 #include <stdint.h> 15 #include <stdbool.h> 16 17 /* Inline */ 18 #ifdef _MSC_VER 19 #define lxb_inline static __forceinline 20 #else 21 #define lxb_inline static inline 22 #endif 23 24 25 /* Simple types */ 26 typedef uint32_t lxb_codepoint_t; 27 typedef unsigned char lxb_char_t; 28 typedef unsigned int lxb_status_t; 29 30 /* Callbacks */ 31 typedef lxb_status_t (*lexbor_callback_f)(const lxb_char_t *buffer, 32 size_t size, void *ctx); 33 34 35 #ifdef __cplusplus 36 } /* extern "C" */ 37 #endif 38 39 #endif /* LEXBOR_TYPES_H */ 40