Remove cyclic dependency between str_array.h and r3.h
This also makes sure we dont get warnings regarding bool redefinitions when building with clang.
This commit is contained in:
parent
0072b618b6
commit
4babe735e8
2 changed files with 14 additions and 15 deletions
15
include/r3.h
15
include/r3.h
|
@ -13,23 +13,14 @@
|
|||
#include <pcre.h>
|
||||
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#else
|
||||
|
||||
#if !defined(bool) && !defined(__cplusplus)
|
||||
# include <stdbool.h>
|
||||
#elif !defined(bool) && !defined(__cplusplus)
|
||||
typedef unsigned char bool;
|
||||
#endif
|
||||
#ifndef false
|
||||
# define bool bool /* For redefinition guards */
|
||||
# define false 0
|
||||
#endif
|
||||
#ifndef true
|
||||
# define true 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include "str_array.h"
|
||||
#include "r3_slug.h"
|
||||
#include "memory.h"
|
||||
|
|
|
@ -8,9 +8,17 @@
|
|||
#ifndef STR_ARRAY_H
|
||||
#define STR_ARRAY_H
|
||||
|
||||
#include "r3.h"
|
||||
#include "memory.h"
|
||||
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#elif !defined(bool) && !defined(__cplusplus)
|
||||
typedef unsigned char bool;
|
||||
# define bool bool /* For redefinition guards */
|
||||
# define false 0
|
||||
# define true 1
|
||||
#endif
|
||||
|
||||
typedef struct _str_array {
|
||||
R3_VECTOR(r3_iovec_t) slugs;
|
||||
R3_VECTOR(r3_iovec_t) tokens;
|
||||
|
|
Loading…
Reference in a new issue