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
Support SWI-Prolog versions > 8.5.2 #133
Conversation
After SWI-Prolog 8.5.2, PL_version was renamed to PL_version_info, causing pyswip to crash when used with SWI-Prolog versions > 8.5.2.
@yuce, could you please merge this one. It could also be done a bit simpler, e.g.,
Both will run on older versions as well as on the latest stable and dev versions. |
pyswip/core.py
Outdated
PL_VERSION=70000 # Best guess. When was PL_version introduced? | ||
# swi-prolog <= 8.5.2: | ||
try: | ||
PL_version = _lib.PL_version |
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.
I use Aleph and it wasn't working with SWI_prolog 9.x until I changed this line to PL_version = _lib.PL_version_info
.
@david-r-cox Would it be possible for you to incorporate @JanWielemaker 's suggestion? |
@yuce I've added @JanWielemaker's suggested changes and tested them against swipl-devel V9.1.2 (see this Dockerfile). Let me know if any further changes are required. |
@david-r-cox Thanks for the update! Could you also add your name to |
Thanks for your contribution! |
PL_version
was renamed toPL_version_info
in SWI-Prolog due to Exported symbol PL_version conflicts with symbol in Perl.I noticed that this change resulted in a crash in PySwip, and opened swipl-devel #910.
After reviewing the notes added to that issue by @dgelessus, I decided to open this PR with a fix.