Skip to content

Conversation

@andynoack
Copy link
Collaborator

Thanks to ahesford:

Failure to compile with Cython 3.1 is caused by a collision between struct hackrf_device_list and the function hackrf_device_list. In the C library that this wraps, the two names are distinct. Cython, however, folds struct hackrf_device_list into just hackrf_device_list. Fortunately, Cython allows the use of a name for its definitions that differs from the underlying C name, so the struct can just be called c_hackrf_device_list. This doesn't seem to be a critical change because the immediately following typedef just aliases this to hackrf_device_list_t everywhere it is needed.

Cf. http://docs.cython.org/en/stable/src/userguide/external_C_code.html#resolving-naming-conflicts-c-name-specifications

Thanks to ahesford:

Failure to compile with Cython 3.1 is caused by a collision between struct hackrf_device_list and the function hackrf_device_list. In the C library that this wraps, the two names are distinct. Cython, however, folds struct hackrf_device_list into just hackrf_device_list. Fortunately, Cython allows the use of a name for its definitions that differs from the underlying C name, so the struct can just be called c_hackrf_device_list. This doesn't seem to be a critical change because the immediately following typedef just aliases this to hackrf_device_list_t everywhere it is needed.

Cf. http://docs.cython.org/en/stable/src/userguide/external_C_code.html#resolving-naming-conflicts-c-name-specifications
@andynoack andynoack merged commit 4979a5c into master Jul 31, 2025
15 of 16 checks passed
@andynoack andynoack deleted the fix_cython31 branch July 31, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants