Skip to content

[2/2] Add callback type attribute used by async methods#725

Closed
Akarinnnnn wants to merge 3 commits intorlabrecque:masterfrom
Akarinnnnn:cbattr-attributes
Closed

[2/2] Add callback type attribute used by async methods#725
Akarinnnnn wants to merge 3 commits intorlabrecque:masterfrom
Akarinnnnn:cbattr-attributes

Conversation

@Akarinnnnn
Copy link
Contributor

Requires #724, split out from #720. Add callback annotations attributes used by async steam methods. Notice: this change does not involve generated file. Should use another commit to update these generated files.

I plan to add generic constraint to Callback<T> and CallResult<T>, to avoid misuses like Callback<StructFromCallResult_t>. They will look like Callback<T> where T : ICallbackStruct and CallResult<T> where T : ICallResultStruct. Generated structs which comes from callback dispatch system will implement one of these marker interface.

After this change, inteface gen should run before struct gen. This is mentioned in CodeGen entrypoint to avoid accidently reordered.
@Akarinnnnn Akarinnnnn closed this Feb 20, 2026
@Akarinnnnn Akarinnnnn deleted the cbattr-attributes branch February 20, 2026 16:33
@Akarinnnnn Akarinnnnn restored the cbattr-attributes branch February 26, 2026 22:21
@Akarinnnnn Akarinnnnn deleted the cbattr-attributes branch February 26, 2026 22:24
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