[aot] Proper type checking in C-API header generator #7979
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #
Brief Summary
🤖 Generated by Copilot at 0e63d20
Refactored and fixed bugs in the scripts for generating the C API and the Unity language binding. Improved the JSON schema handling and versioning.
Walkthrough
🤖 Generated by Copilot at 0e63d20
get_declr
functions ingenerate_c_api.py
andgenerate_unity_language_binding.py
to useisinstance
instead oftype
for checking the entry type (link, link, link, link, link, link, link, link, link, link, link, link, link, link)generate_c_api.py
where the enumeration case name was not converted to snake case before passing it toget_api_field_ref
(link)generate_unity_language_binding.py
where the regular expression for matching the module name was missing the raw string prefix (link)generate_c_api.py
andtaichi_json.py
(link, link, link, link)taichi_json.py
for better type checking and readability (link, link, link, link, link, link, link)get_type_name
function ingenerate_unity_language_binding.py
to useisinstance
instead oftype
for checking the entry type (link)