Skip to content

link_grammar.i: Use PyLong_* instead of PyInt_* - #1543

Merged
linas merged 1 commit into
opencog:masterfrom
daeho-ro:swig-4.5-pylong
Sep 20, 2026
Merged

linas merged 1 commit into
opencog:masterfrom
daeho-ro:swig-4.5-pylong

Conversation

@daeho-ro

Copy link
Copy Markdown
Contributor

SWIG 4.5 removed the Python 2 compatibility macros (PyInt_Check, PyInt_AsLong, PyInt_FromLong, ...) that it used to keep in the generated wrapper for user typemaps (see the 2026-07-06 entry in SWIG's CHANGES.current). The typemaps in bindings/swig/link_grammar.i still use them, so the Python bindings fail to compile with SWIG 4.5

SWIG 4.5 removed the Python 2 compatibility macros (PyInt_Check, PyInt_AsLong, PyInt_FromLong) from the generated wrapper, so the Python bindings fail to compile with it. Use the Python 3 C API directly.
@linas
linas merged commit ec7a72e into opencog:master Sep 20, 2026
1 check passed
@linas

linas commented Sep 20, 2026

Copy link
Copy Markdown
Member

Thank you!

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