Skip to content

Use typed data API#37

Merged
bryanp merged 3 commits into
bryanp:mainfrom
nobu:typed-data
Jun 28, 2026
Merged

Use typed data API#37
bryanp merged 3 commits into
bryanp:mainfrom
nobu:typed-data

Conversation

@nobu

@nobu nobu commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

nobu added 3 commits June 1, 2026 20:43
Allocate the parser with Data_Make_Struct so Ruby owns the memory as soon as the object is created. This avoids leaking the malloc buffer if Data_Wrap_Struct raises while allocating the Ruby object.
Use TypedData_Make_Struct and TypedData_Get_Struct when available so the parser wrapper does not depend on the old Data_* accessors removed by newer Ruby.
Use const char pointers for data callbacks so their signatures match llhttp_data_cb and the assignments no longer need function pointer casts.
@byroot

byroot commented Jun 16, 2026

Copy link
Copy Markdown

@bryanp sorry for the ping, but any chance you could merge and release this? Testing ruby prereleases is pretty hard right now because of this PR.

@bryanp

bryanp commented Jun 18, 2026

Copy link
Copy Markdown
Owner

@byroot yes, will get to it this week

@bryanp bryanp merged commit 00d1910 into bryanp:main Jun 28, 2026
8 of 11 checks passed
@bryanp

bryanp commented Jun 28, 2026

Copy link
Copy Markdown
Owner

@byroot thanks for your patience, just released: https://rubygems.org/gems/llhttp/versions/0.6.2

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.

3 participants