Skip to content

Remove preliminary late includes cy28 - #243

Closed
cxzhong wants to merge 1 commit into
sagemath:mainfrom
cxzhong:remove-preliminary_late_includes_cy28
Closed

Remove preliminary late includes cy28#243
cxzhong wants to merge 1 commit into
sagemath:mainfrom
cxzhong:remove-preliminary_late_includes_cy28

Conversation

@cxzhong

@cxzhong cxzhong commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

The 'preliminary_late_includes_cy28' directive was a temporary workaround introduced in Cython 0.28 (GH#2079) to control include ordering. Now that macros.h is included before Cython emits its own declarations, we fix this properly by:

  • Add extern forward declarations for cysigs and helper functions directly in macros.h, making it self-contained
  • Add an unlikely() fallback macro in macros.h for early-include contexts
  • Remove static from exported symbols in implementation.c and add CYSIGNALS_API visibility attribute so they are accessible from other extension modules
  • Move shared symbol declarations in signals.pxd from the Cython cdef nogil capsule mechanism to cdef extern from macros.h
  • Link tests extension against signals in meson.build

@cxzhong
cxzhong force-pushed the remove-preliminary_late_includes_cy28 branch 2 times, most recently from 23e986c to aee0780 Compare April 4, 2026 16:56
@cxzhong
cxzhong marked this pull request as draft April 4, 2026 16:57
@cxzhong
cxzhong force-pushed the remove-preliminary_late_includes_cy28 branch from aee0780 to 156fa4b Compare April 4, 2026 17:00
@cxzhong
cxzhong force-pushed the remove-preliminary_late_includes_cy28 branch from 156fa4b to 22f4e0f Compare April 4, 2026 17:40
@cxzhong cxzhong closed this Apr 4, 2026
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.

1 participant