-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update and improve PCRE wrapper #2506
Conversation
- Version 8.36 (was 8.31) - Support for editable functions - Name arguments according to docs - Cosmetics
# that is triggered by the (?) regex item. For Virtual Pascal, these definitions | ||
# have to take another form. | ||
var | ||
pcre_malloc*: proc (a: csize): pointer {.cdecl.} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cannot work! It's not imported nor should it be. Remove the whole 'var' section please.
Oh, what about |
pure, final are not necessary anymore. |
I think the pull request is ready. |
JitCallback* = proc (a: pointer): ptr JitStack {.cdecl.} | ||
|
||
|
||
when not defined(pcreDll): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er, this should be the default.
Changed to (And accidentally closed the pull request 😢) |
Support for editable functionsIt is largely backwards-compatible (re module keeps working, with some deprecation warnings, which I fixed in the 2nd commit), but some differences are present (e.g. there is an argument
ptr cuchar
pointer
that used to becstring
).All tests of re pass. I also tried these changes on my library that uses re, and all its tests passed.
I based this work on @flaviut's PCRE wrapper.