summaryrefslogtreecommitdiff
path: root/src/regex__FFI.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex__FFI.h')
-rw-r--r--src/regex__FFI.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/regex__FFI.h b/src/regex__FFI.h
index 84b81a9..7399005 100644
--- a/src/regex__FFI.h
+++ b/src/regex__FFI.h
@@ -26,27 +26,28 @@ extern "C" {
#include <urweb/urweb_cpp.h>
typedef struct {
- char* haystack;
- void* result;
-} uw_Regex__FFI_match;
+ long start;
+ long length;
+} uw_Regex__FFI_substring_t;
-uw_Basis_bool uw_Regex__FFI_succeeded(struct uw_context*,
- const uw_Regex__FFI_match);
+typedef void* uw_Regex__FFI_substring_list_t;
-uw_Basis_int uw_Regex__FFI_n_subexpression_matches(struct uw_context*,
- const uw_Regex__FFI_match);
+uw_Basis_int uw_Regex__FFI_substring_start(struct uw_context*,
+ const uw_Regex__FFI_substring_t);
-uw_Basis_string uw_Regex__FFI_subexpression_match(struct uw_context*,
- const uw_Regex__FFI_match,
- const uw_Basis_int);
+uw_Basis_int uw_Regex__FFI_substring_length(struct uw_context*,
+ const uw_Regex__FFI_substring_t);
-uw_Regex__FFI_match uw_Regex__FFI_do_match(struct uw_context*,
- const uw_Basis_string,
- const uw_Basis_string);
+uw_Basis_int uw_Regex__FFI_substring_list_length(
+ struct uw_context*, const uw_Regex__FFI_substring_list_t);
-uw_Basis_string uw_Regex__FFI_replace(struct uw_context*, const uw_Basis_string,
- const uw_Basis_string,
- const uw_Basis_string);
+uw_Regex__FFI_substring_t uw_Regex__FFI_substring_list_get(
+ struct uw_context*, const uw_Regex__FFI_substring_list_t,
+ const uw_Basis_int);
+
+uw_Regex__FFI_substring_list_t uw_Regex__FFI_do_match(struct uw_context*,
+ const uw_Basis_string,
+ const uw_Basis_string);
#ifdef __cplusplus
}