about summary refs log tree commit diff stats
path: root/src/bindings/libregexp.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-01-01 16:14:01 +0100
committerbptato <nincsnevem662@gmail.com>2023-01-01 18:31:17 +0100
commit1a24350ee44859f6b3370ac15e8875a79fa7ae9b (patch)
tree0c168d725baa44bf1813c1456c9c835c4e1bf776 /src/bindings/libregexp.nim
parent9a22a844c956d80f0d5c80330e898d52acadfd2f (diff)
downloadchawan-1a24350ee44859f6b3370ac15e8875a79fa7ae9b.tar.gz
buffer: fix some search bugs & refactor regex stuff
cursorBytes uses twidth now.
cursorNextMatch matches the byte *after* the cursor (somewhat more
consistently than before).
match() no longer counts capture groups. LRE_FLAG_GLOBAL now goes
through the entire string.
Diffstat (limited to 'src/bindings/libregexp.nim')
-rw-r--r--src/bindings/libregexp.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bindings/libregexp.nim b/src/bindings/libregexp.nim
index 957730ad..ecc0813a 100644
--- a/src/bindings/libregexp.nim
+++ b/src/bindings/libregexp.nim
@@ -8,12 +8,12 @@ const
 
 proc lre_compile*(plen: ptr cint, error_msg: cstring, error_msg_size: cint,
                   buf: cstring, buf_len: csize_t, re_flags: cint,
-                  opaque: pointer): ptr uint8 {.importc: "lre_compile".}
+                  opaque: pointer): ptr uint8 {.importc.}
 
 proc lre_exec*(capture: ptr ptr uint8, bc_buf: ptr uint8, cbuf: ptr uint8,
                cindex: cint, clen: cint, cbuf_type: cint,
-               opaque: pointer): cint {.importc: "lre_exec".}
+               opaque: pointer): cint {.importc.}
 
-proc lre_get_capture_count*(bc_buf: ptr uint8): cint {.importc: "lre_get_capture_count".}
+proc lre_get_capture_count*(bc_buf: ptr uint8): cint {.importc.}
 
-proc lre_get_flags*(bc_buf: ptr uint8): cint {.importc: "lre_get_flags".}
+proc lre_get_flags*(bc_buf: ptr uint8): cint {.importc.}