Skip to content

fix: safer callback handling and argument validation#5

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

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

Conversation

@nazarhussain
Copy link
Copy Markdown
Contributor

@nazarhussain nazarhussain commented Mar 17, 2026

  • 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

Copy link
Copy Markdown
Member

@wemeetagain wemeetagain left a comment

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