Skip to content
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

dart:ffi hide or restrict Pointer.address and fromAddress #35844

Closed
dcharkes opened this issue Feb 4, 2019 · 0 comments
Closed

dart:ffi hide or restrict Pointer.address and fromAddress #35844

dcharkes opened this issue Feb 4, 2019 · 0 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-ffi type-design

Comments

@dcharkes
Copy link
Contributor

dcharkes commented Feb 4, 2019

Do you have a pressing need for pointer<->integer conversion? Even in C++ that is usually only necessary in ultra low-level code (e.g. kernel drivers) and otherwise invites risky trickery (e.g. some struct offset arithmetic magic that gets brittle).

I'd leave that part out, or restrict it's use.

Especially if the dart:ffi library calculates sizes and field offsets itself, wrapper writers probably often do not want to expose the integer addresses to the users.

How can we enable wrapper writers to disallow wrapper users to use fromAddress and .address?

Related to: #35841

@dcharkes dcharkes added the area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. label Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-ffi type-design
Projects
None yet
Development

No branches or pull requests

2 participants