Skip to content

[mypyc] Tweak how tuple structs are defined #7630

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

Merged
merged 1 commit into from
Oct 4, 2019
Merged

Conversation

msullivan
Copy link
Collaborator

Change how we declare and define tuple structs to prepare for separate compilation:

  • Wrap declarations in an #ifdef/#define so that multiple modules
    can define the same tuple types (since they are structural) and
    interoperate properly.
  • Declare the undefined values eagerly instead of only when they
    are needed, since they might be needed by another compilationg group.
  • Declare them with a typedef instead of always writing struct. This
    will very slightly simplify some logic for manipulating the type string
    later but mostly just looks better.

Change how we declare and define tuple structs to prepare for separate compilation:
 * Wrap declarations in an #ifdef/#define so that multiple modules
   can define the same tuple types (since they are structural) and
   interoperate properly.
 * Declare the undefined values eagerly instead of only when they
   are needed, since they might be needed by another compilationg group.
 * Declare them with a typedef instead of always writing struct. This
   will very slightly simplify some logic for manipulating the type string
   later but mostly just looks better.
@msullivan msullivan merged commit 8f381b8 into master Oct 4, 2019
@msullivan msullivan deleted the tuple-tweaks branch October 4, 2019 21:56
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