-
Notifications
You must be signed in to change notification settings - Fork 135
Add support for property queries. #108
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
Conversation
4be15e2
to
c2571b6
Compare
@vaind Two other issues: it looks like for 8-32 bit integers, if their value is negative the property query returns an unsigned value. When doing sums or average they also appear to be treated as unsigned. Secondly, byte values appear to get returned as unsigned, even via the box interface. Though the property query sum then works correctly. Oh my. |
d7a92e0
to
05d7a9e
Compare
Resolved integer issue by correcting |
c1e73ce
to
cd50c5e
Compare
Byte unsigned issue is rooted in the binding treating them as unsigned, submitted patch in #109. This leaves one issue: null floats (not doubles) getting returned as |
Was casting double to float, issue resolved as well. Pending #109 and a final round of clean-up and docs (e.g. on find(), sum() and etc. methods). |
a2e674a
to
ca0650b
Compare
@greenrobot-team see the latest commits - should be ready for the merge after #109 is merged so that the tests pass |
Just for future reference - the issue with double-free/invalid pointers was caused by a signature mismatch between dart property query function definitions and c-api functions, e.g. |
…ysis. Instead specify the pointer type when binding the native function.
dartfmt -l 120 -w .
d3e34cc
to
b1766d5
Compare
Rebased onto main with #109 included. Tests all good now. Merging. |
Squashed and rebased changes from #75
Remaining issues
Wrong types in.find(replaceNullWith:-1)
broken for negative values: it looks like unsigned integers are returned? E.g.255/65535/4294967295/-1
is returned instead of-1
for8/16/32/64
bit integers.Struct
s.Similar: floats returnWas casting double to float.0.0
instead of replacement value, but double works fine.There are code errors in bindings.dart and signatures.dart.Native property query appears to auto-close/free, e.g. getting results twice crashes, or closing/freeing the property query crashes.Gone, probably wrong pointer types? Odd.