Fix for stdbool type
This commit is contained in:
parent
b0971e1553
commit
1f1ab15cdd
2 changed files with 6 additions and 8 deletions
10
include/r3.h
10
include/r3.h
|
@ -12,8 +12,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pcre.h>
|
#include <pcre.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -23,11 +21,11 @@
|
||||||
#if !defined(bool) && !defined(__cplusplus)
|
#if !defined(bool) && !defined(__cplusplus)
|
||||||
typedef unsigned char bool;
|
typedef unsigned char bool;
|
||||||
#endif
|
#endif
|
||||||
#ifndef FALSE
|
#ifndef false
|
||||||
# define FALSE 0
|
# define false 0
|
||||||
#endif
|
#endif
|
||||||
#ifndef TRUE
|
#ifndef true
|
||||||
# define TRUE 1
|
# define true 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -772,13 +772,13 @@ node * r3_tree_insert_pathl_ex(node *tree, const char *path, int path_len, route
|
||||||
}
|
}
|
||||||
|
|
||||||
bool r3_node_has_slug_edges(const node *n) {
|
bool r3_node_has_slug_edges(const node *n) {
|
||||||
bool found = FALSE;
|
bool found = false;
|
||||||
edge *e;
|
edge *e;
|
||||||
for ( int i = 0 ; i < n->edge_len ; i++ ) {
|
for ( int i = 0 ; i < n->edge_len ; i++ ) {
|
||||||
e = &n->edges[i];
|
e = &n->edges[i];
|
||||||
e->has_slug = r3_path_contains_slug_char(e->pattern);
|
e->has_slug = r3_path_contains_slug_char(e->pattern);
|
||||||
if (e->has_slug)
|
if (e->has_slug)
|
||||||
found = TRUE;
|
found = true;
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue