Open mildsunrise opened 3 years ago
You can include the breaking changes here directly, I'll release 1.0 right after it's merged.
hmm I would wait a bit before the breaking release, just in case there are more breaking changes we haven't discovered yet? either way, +1
The breaking changes need to land on master anyway, even if we wait before the release. You can add them here directly, it will be simpler.
Perfect, done. This seems to be working but I'll test it some more to make sure.
(note to self: parts of this PR have been merged as #301 and #322... I should take those out and rebase)
BigInt-related API fixes and (for now, only) non-breaking changes.
input conversions for BigInt:
all integer types (8, 16, 32, 64) now accept bigint and number
64-bit integer types ([u]long, [u]int64, gtype) now convert the value to BigInt and then call
[U]Int64Value()
(the other integer types still convert to Number first, which means IIRC that if an out-of-range BigInt is passed, they'll get converted to trash rather than the low bits, as the user would expect. but it's better for performance and user can just
& 0xFFFFFFFFn
)GType consistency (these are breaking, but very little used so I think a fix like this is justified):
GValueToV8
now convertsGType
to BigInt to be consistentGType
s only support conversion from BigInt nowI've also annotated the places that should be changed to completely support BigInt, but would be a breaking change.
other non-BigInt related fixes:
CanConvertV8ToGValue