Skip to content
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

Merged
merged 4 commits into from
Apr 21, 2015
Merged

Update and improve PCRE wrapper #2506

merged 4 commits into from
Apr 21, 2015

Conversation

oprypin
Copy link
Contributor

@oprypin oprypin commented Apr 10, 2015

  • Version 8.36 (was 8.31)
  • Support for editable functions
  • Deprecate T,P
  • Name arguments according to docs
  • Cosmetics

It 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 be cstring).

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.

- 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.}
Copy link
Member

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.

@oprypin
Copy link
Contributor Author

oprypin commented Apr 10, 2015

Oh, what about pure, final? Are these important?

@Araq
Copy link
Member

Araq commented Apr 10, 2015

pure, final are not necessary anymore.

@oprypin
Copy link
Contributor Author

oprypin commented Apr 10, 2015

I think the pull request is ready.

JitCallback* = proc (a: pointer): ptr JitStack {.cdecl.}


when not defined(pcreDll):
Copy link
Member

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.

@oprypin
Copy link
Contributor Author

oprypin commented Apr 10, 2015

Changed to usePcreHeader as per request, to fix a bug introduced in 5f0d685

(And accidentally closed the pull request 😢)

@oprypin oprypin closed this Apr 10, 2015
@Araq Araq reopened this Apr 10, 2015
@oprypin oprypin mentioned this pull request Apr 10, 2015
12 tasks
Araq added a commit that referenced this pull request Apr 21, 2015
Update and improve PCRE wrapper
@Araq Araq merged commit 1b80e2f into nim-lang:devel Apr 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants