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

D bindgen: add memtrack and fix fetch update #1187

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

kassane
Copy link
Contributor

@kassane kassane commented Jan 12, 2025

  • fix fetch update
  • add memtrack

cc: @floooh

Note: Tried add nuklear, spine and gfx_imgui, but get struct error!!

ERROR gen_struct: sspine_t * spine;
ERROR gen_struct: sgimgui_buffer_t * slots;

* fix fetch update
* add memtrack
bindgen/gen_d.py Outdated Show resolved Hide resolved
@floooh
Copy link
Owner

floooh commented Jan 12, 2025

For some of the headers under util, the hassle to effort to make them bindings compatible probably isn't worth the effort (especially when they depend on 3rd party libs like sokol_spine.h).

@floooh
Copy link
Owner

floooh commented Jan 12, 2025

...looks like sokol_memtrack.h also has issues (see CI jobs). For sokol_memtrack.h I also wonder if that's all that useful, since it's such a trivial thing to do natively in the target language.

@kassane
Copy link
Contributor Author

kassane commented Jan 12, 2025

For sokol_memtrack.h I also wonder if that's all that useful, since it's such a trivial thing to do natively in the target language.

In D case, users could use this wrapper to access malloc/free with no interference from GC. Unfortunately, not all users feel comfortable using malloc/free directly.
This avoids creating your own allocation solution.

@floooh
Copy link
Owner

floooh commented Jan 12, 2025

Oki, is the PR ready, or do you want to do more changes? :)

@kassane
Copy link
Contributor Author

kassane commented Jan 12, 2025

Done!

@floooh floooh merged commit 7b5b512 into floooh:master Jan 12, 2025
32 checks passed
@floooh
Copy link
Owner

floooh commented Jan 12, 2025

...and merged. Thanks!

@kassane kassane deleted the d-bindgen-fixes branch January 12, 2025 15:59
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.

2 participants