Skip to content

Generate callback type marker on callback struct(requires interface func attribute analysis)#727

Open
Akarinnnnn wants to merge 2 commits intorlabrecque:masterfrom
Akarinnnnn:cb-struct-callback-kind
Open

Generate callback type marker on callback struct(requires interface func attribute analysis)#727
Akarinnnnn wants to merge 2 commits intorlabrecque:masterfrom
Akarinnnnn:cb-struct-callback-kind

Conversation

@Akarinnnnn
Copy link
Contributor

@Akarinnnnn Akarinnnnn commented Jul 16, 2025

Requires #724. This function is based on interface function attribute analysis.

Generate callback type marker on callback struct

After this change, interface gen should run before struct gen. This is mentioned in CodeGen entry point to avoid accidently reordered.

After this change, inteface gen should run before struct gen. This is mentioned in CodeGen entrypoint to avoid accidently reordered.
@Akarinnnnn
Copy link
Contributor Author

Akarinnnnn commented Jul 16, 2025

After this merged, apply generic constraint on Callback<T> etc. like Callback<T> where T : ICallbackStruct can efficiently prevent users attempt to retrieve call-result by callback system. This has been our FAQ a long time.

@Akarinnnnn
Copy link
Contributor Author

XML document comments of marker interfaces may be added in next 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.

1 participant