summaryrefslogtreecommitdiff
path: root/src/regex__FFI.h
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2015-07-27 17:03:43 -0400
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2015-07-27 17:03:43 -0400
commita8b108619083c2088269ea8071c7958f277ed41f (patch)
tree2bd68e215161d64e34cce66863ab8c0ebd1d44d2 /src/regex__FFI.h
parenta6c2ac566bd749c14a29f7d8d9d2d4898b1d49de (diff)
Rework to use the C++11 regex library
Switch to using the C++11 regex library for better portability and ease of use. As an added bonus, this should make it easier to implement regex substitution.
Diffstat (limited to 'src/regex__FFI.h')
-rw-r--r--src/regex__FFI.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/regex__FFI.h b/src/regex__FFI.h
index 6fa9482..9d6a2c2 100644
--- a/src/regex__FFI.h
+++ b/src/regex__FFI.h
@@ -22,16 +22,11 @@ extern "C" {
#include <urweb/urweb_cpp.h>
-typedef struct {
- char* text;
- void* compiled;
-} uw_Regex__FFI_regex;
+typedef void* uw_Regex__FFI_regex;
typedef struct {
char* haystack;
- int succeeded;
- unsigned n_matches;
- regmatch_t* matches;
+ void* result;
} uw_Regex__FFI_match;
uw_Basis_bool uw_Regex__FFI_succeeded(struct uw_context*,