Skip to content

fix: safer callback handling and argument validation#5

Merged
wemeetagain merged 2 commits into
mainfrom
nh/safer-callback-handling
Mar 19, 2026
Merged

fix: safer callback handling and argument validation#5
wemeetagain merged 2 commits into
mainfrom
nh/safer-callback-handling

Conversation

@nazarhussain

@nazarhussain nazarhussain commented Mar 17, 2026

Copy link
Copy Markdown
Contributor
  • callback.zig: Uses a static error message instead of potentially-null error_info.error_message
  • callback_info.zig: Zero-initializes fields instead of leaving them undefined
  • create_callback.zig: Validates argument count (throws instead of reading uninitialized), adds
    external_buffer hint

@wemeetagain wemeetagain left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good.

Just want to say, I quite hate the createCallback "hint" system tho XD

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