Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dart API merge IntegerFitsInto... and IntegerTo... #2748

Closed
@whesse

Description

@whesse

When using the API to get an integer from a Dart integer object, we need to call two api functions, and check two error conditions and a boolean return, to get the integer value.

It seems quite unlikely to me that one would want to check whether a Dart integer fits into int64_t, but not also get that value if the answer is yes.
So I think that a combined
Dart_IntegerToInt64(Dart_Handle integer, int64_t* value, bool* fits)
returning both the value, if it fits, and a boolean saying if the value fits
would be easier to use.

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions