Skip to content

bind ghostty_alloc/ghostty_free and replace C.malloc/C.free#8

Merged
mitchellh merged 1 commit intomainfrom
push-xoqvpoxzlzlm
Apr 11, 2026
Merged

bind ghostty_alloc/ghostty_free and replace C.malloc/C.free#8
mitchellh merged 1 commit intomainfrom
push-xoqvpoxzlzlm

Conversation

@mitchellh
Copy link
Copy Markdown
Owner

Add alloc.go with exported Alloc and Free functions wrapping the upstream ghostty_alloc() and ghostty_free() from allocator.h. These use the default (NULL) allocator, matching how the rest of the bindings pass nil for the allocator parameter.

This is important because it lets us not explicitly depend on any libc functionality.

Add alloc.go with exported Alloc and Free functions wrapping the
upstream ghostty_alloc() and ghostty_free() from allocator.h. These
use the default (NULL) allocator, matching how the rest of the
bindings pass nil for the allocator parameter.

This is important because it lets us not explicitly depend on any libc 
functionality.
@mitchellh mitchellh merged commit 5367d47 into main Apr 11, 2026
26 checks passed
@mitchellh mitchellh deleted the push-xoqvpoxzlzlm branch April 11, 2026 20:18
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