From 5daf973fa5ba6fdbf2b4a65f4aed6513e337be8e Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 23 Jun 2016 09:29:58 +0200 Subject: exec flags --- Regex.icl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Regex.icl') diff --git a/Regex.icl b/Regex.icl index e85c630..e9ee1f5 100644 --- a/Regex.icl +++ b/Regex.icl @@ -36,10 +36,13 @@ where ccall cleanrgx_free "p:V:S" } -match :: !Regex !String -> Maybe Bool -match {ptr} s = case match` ptr s of 0 = Just False; 1 = Just True; _ = Nothing +match :: !Regex !Flags !String -> Maybe Bool +match {ptr} flags s = case match` ptr flags s of + 0 = Just False + 1 = Just True + _ = Nothing where - match` :: !Int !String -> Int - match` ptr s = code { - ccall cleanrgx_exec "pS:I" + match` :: !Int !Int !String -> Int + match` ptr flags s = code { + ccall cleanrgx_exec "pIS:I" } -- cgit v1.2.3