summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cregex.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-01-17 08:32:08 +0100
committerTyge Løvset <[email protected]>2022-01-17 08:32:08 +0100
commitdf626f83dbf7789d622a1c5f4ff9fec3f61bc61b (patch)
tree211a38d07e9ea653f0a8deabe5a63f425036e508 /include/stc/cregex.h
parent7ab5c49a47de856ea58a979cdc086ea22d8eceff (diff)
downloadSTC-modified-df626f83dbf7789d622a1c5f4ff9fec3f61bc61b.tar.gz
STC-modified-df626f83dbf7789d622a1c5f4ff9fec3f61bc61b.zip
Fixed object linkage declarations/definitions.
Diffstat (limited to 'include/stc/cregex.h')
-rw-r--r--include/stc/cregex.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/stc/cregex.h b/include/stc/cregex.h
index 43196049..149cb7be 100644
--- a/include/stc/cregex.h
+++ b/include/stc/cregex.h
@@ -57,6 +57,9 @@ typedef enum {
STC_INLINE cregex cregex_init(void)
{ cregex rx = {NULL}; return rx; }
+STC_INLINE bool cregex_valid(cregex rx)
+ { return rx.nodes != NULL; }
+
/* create and compile a regular expression */
STC_API cregex cregex_new(const char *re);
@@ -297,7 +300,7 @@ static bool _rx_or_is_match(cregex_node *node, const char *orig,
}
/* Global error value with callback address */
-struct {
+static struct {
cregex_error_t err;
const char *s;
jmp_buf buf;