10000 feat: support Deno v1.25 by tjosepo · Pull Request #25 · denosaurs/deno_python · GitHub
[go: up one dir, main page]

Skip to content

feat: support Deno v1.25 #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2022
Merged

Conversation

tjosepo
Copy link
Contributor
@tjosepo tjosepo commented Aug 28, 2022

These changes are not backward compatible with Deno version 1.24 and below!

Deno 1.25 released with some changes to the FFI API.

buffer

pointer no longer accept JavaScript TypedArray. Instead, we need to use type buffer.

Deno.PointerValue

Deno now returns pointers as number or bigint according to their size. See Deno CLI API.

On a 32 bit system all pointer values are plain numbers. On a 64 bit system pointer values are represented as numbers if the value is below Number.MAX_SAFE_INTEGER.

This means that all pointers 0n will now be 0.

Misc

Deno FFI functions now accept number as a pointer (altough their TypeScript type definitions still says they only support bigint)


These changes broke deno_python, so I fixed the code to support the latest version of Deno.

All tests should now pass on Deno 1.25.

I've been out of the loop for a while, so let me know if I missed anything 😄

Copy link
Member
@DjDeveloperr DjDeveloperr left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@DjDeveloperr DjDeveloperr merged commit 0626ad6 into denosaurs:main Aug 29, 2022
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
0