Skip to content

Adjust Python bindings for SWIG >= 4.4.#280

Open
aryler wants to merge 1 commit intosigrokproject:masterfrom
aryler:aryler-swig44
Open

Adjust Python bindings for SWIG >= 4.4.#280
aryler wants to merge 1 commit intosigrokproject:masterfrom
aryler:aryler-swig44

Conversation

@aryler
Copy link

@aryler aryler commented Jan 18, 2026

Function signature changed in SWIG 4.4. Details:
numpy/numpy@1e424da

Could maybe use NULL instead of nullptr; they should be the same with SWIG < 4.4.
Minor detail. Not sure what's better.

Function signature changed in SWIG 4.4. Details:
numpy/numpy@1e424da
@Krakonos
Copy link

Hi!

Let's say the API change is a bit unfortunate. Based on the commit mentioned, the 0 is correct. However, I believe the previous version should use NULL instead of nullptr, since nullptr is a C23 feature ( https://en.cppreference.com/w/c/language/nullptr.html ). It might be mistaked for nullptr in C++ that was introduced much earlier, but the code in question is C.

@aryler aryler marked this pull request as ready for review January 19, 2026 13:48
@aryler
Copy link
Author

aryler commented Jan 19, 2026

Hi, thanks for looking into this.

Here, you can see similar, using NULL. They haven't removed the Python 2 guard (yet?).
coin3d/pivy@b8e55e2

@Krakonos
Copy link

Hi! Yes, that's correct. But the PR as submitted uses nullptr (which was inherited from the original code, but I think it's worth fixing as well).

Copy link

@Krakonos Krakonos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is correct. The only reservation I have is to fix the nullptr -> NULL, but that was not the scope of this PR.

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