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

Fix introspected (u)int64 types to use BigInt #323

Open
peat-psuwit opened this issue Jan 2, 2022 · 2 comments
Open

Fix introspected (u)int64 types to use BigInt #323

peat-psuwit opened this issue Jan 2, 2022 · 2 comments

Comments

@peat-psuwit
Copy link
Contributor

Currently, we're unable to precisely represent a value bigger than Number.MAX_SAFE_INTEGER = 2 ** 53.

const gi = require('node-gtk')
const Gst = gi.require('Gst', '1.0')

console.log(Gst.CLOCK_TIME_NONE)
// Should print: 18446744073709551615
// Currently print: 18446744073709552000

Gjs also has this issue [1], so I'm filing this bug to bring awareness to this problem.

Note that on the argument side, it's simple: just accept both Number and BigInt (see #322).

[1] https://gitlab.gnome.org/GNOME/gjs/-/issues/271

@romgrk
Copy link
Owner

romgrk commented Jan 8, 2022

Closed by #322

@romgrk romgrk closed this as completed Jan 8, 2022
@peat-psuwit
Copy link
Contributor Author

Err... Sorry, should have been more clear. This issue is about getting big uint64 value from introspected object/call. The PR (#322), however, only solve passing BigInt as an argument to introspected call. (It doesn't even have support for setting BigInt to a property.)

Please re-open this issue.

@binyamin binyamin reopened this Jan 10, 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

No branches or pull requests

3 participants