Skip to content
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

Prepare headers for rz-bindgen #2786

Merged
merged 1 commit into from Jul 21, 2022
Merged

Prepare headers for rz-bindgen #2786

merged 1 commit into from Jul 21, 2022

Conversation

wingdeans
Copy link
Contributor

Checklist

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

Container types (eg. RzList) in headers should specify the type of their contents in a block comment.
The format /*<content_type>*/ should work. I've also seen /*<type_key, type_value>*/ for hashtables

...

Test plan

I am working on scripts to warn about missing annotations.

There isn't a way to verify correctness of annotations (yet).

@wingdeans wingdeans force-pushed the header-types branch 2 times, most recently from 5e04383 to 989ae21 Compare July 6, 2022 00:00
Copy link
Member

@ret2libc ret2libc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite cool!
Where is the code you used to do this? Do you plan to add anything else to this PR?

@wingdeans
Copy link
Contributor Author

I'm adding type annotations whenever my binding generator needs a container type's contents, so it only covers parts that are being bound.

I'm working on adding more bindings here

@ret2libc
Copy link
Member

What do you think if you make this PR "ready" and we start merging the current things? I'd like to avoid huge PRs.

@wingdeans wingdeans changed the title Add missing /*<types>*/ Prepare headers for rz-bindgen Jul 18, 2022
@wingdeans wingdeans force-pushed the header-types branch 2 times, most recently from 659c7d5 to af5d3db Compare July 19, 2022 03:33
@wingdeans wingdeans marked this pull request as ready for review July 19, 2022 03:33
librz/analysis/block.c Outdated Show resolved Hide resolved
@XVilka XVilka requested a review from ret2libc July 20, 2022 13:51
@XVilka
Copy link
Member

XVilka commented Jul 21, 2022

@wingdeans please resolve the conflict and we will merge this.

* add some missing /*<types>*/ to rz_core, bin, analysis, cons
* add annotation attributes for rz-bindgen
* fix extern "C" in some headers
* rename RzBuffer functions from length to len
* fix rz_core_analysis_name naming conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants