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

ffiUtil: Make orderedPairs behave with mixed key types #1517

Merged
merged 3 commits into from Sep 15, 2022

Conversation

NiLuJe
Copy link
Member

@NiLuJe NiLuJe commented Sep 14, 2022

Usually involves sorting numbers with strings, but could theoretically be more esoteric ;).

Still assumes that matching types supports comparisons, which may not always be true for custom types without an overloaded operator...

Should be fine for our current needs, though.


This change is Reviewable

Usually involves sorting numbers with strings, but could theoretically
be more esoteric ;).

Still assumes that matching types supports comparisons, which may not
always be true for custom types without an overloaded operator...

Should be fine for our current needs, though.
@NiLuJe
Copy link
Member Author

NiLuJe commented Sep 14, 2022

Hasn't broken any of my LuaSettings so far ;p.

@NiLuJe
Copy link
Member Author

NiLuJe commented Sep 14, 2022

And because I'm a genius, only now do I think about checking the references in that function's comment.

And, yeah, I didn't reinvent the wheel, so this looks sound ;).

ffi/util.lua Outdated Show resolved Hide resolved
Unlikely (ha!) to make any difference in Lua, but, oh, well ;).
@NiLuJe NiLuJe merged commit 66f8b4a into koreader:master Sep 15, 2022
Copy link
Member Author

@NiLuJe NiLuJe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion

NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Sep 15, 2022
NiLuJe added a commit to koreader/koreader that referenced this pull request Sep 15, 2022
Since I never actually needed to look into that data ever until today, let's just get rid of the weird debug-specific behavior.

Instead, just add a dedicated "Developer options" entry that will dump it on demand (and it'll be sorted to boot, which makes it 500% more usable).

Plus, since yesterday's change, the cache format switch between debug or not miiiight actually be crashy, so re-trigger the migration ;p.

* Includes a couple of noteworthy base bumps:

koreader/koreader-base#1516 (update to sdcv 0.5.4 + fixes pending upstream)
koreader/koreader-base#1517 (fix ffiUtil.orderedPairs with keys of mixed types)
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

Successfully merging this pull request may close these issues.

None yet

3 participants