Skip to content

Conversation

@linfan68
Copy link

Found an Error on the .d.ts file (Buffer should be the 3rd argument), refer to different native c code:

xsmcGetBufferReadable(xsArg(2), &buffer, &byteLength);

xsmcGetBufferReadable(xsArg(2), &buffer, &byteLength);

xsmcGetBufferReadable(xsArg(2), &buffer, &byteLength);

xsmcGetBufferReadable(xsArg(2), &buffer, &byteLength);

@phoddie
Copy link
Collaborator

phoddie commented Apr 22, 2025

Yikes!

You are correct that udp.d.ts is out of sync with the implementations. But.... the implementations are wrong! Checking the standard for UDP, the buffer argument is first. That's consistent with the IO Class Pattern which always defines the first argument as the data to be written and leaves the remaining arguments, if any, to the particular class.

I think the implementations should be fixed. That will break some code. Best to do that sooner than later. For the transition, I can check for the first argument being a string and issue a specific exception about the needed change.

mkellner pushed a commit that referenced this pull request May 13, 2025
@phoddie
Copy link
Collaborator

phoddie commented Sep 24, 2025

Closing as the implementation has been updated to match the 419 specification and type declaration.

@phoddie phoddie closed this Sep 24, 2025
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