Page MenuHomePhabricator

eo: fix callback cmp
ClosedPublic

Authored by bu5hm4n on Sep 17 2016, 6:22 AM.

Details

Summary

as told in _eina_stringshared_key_cmp in eina_hash.c:

ogically we want to do this:

return key1 - key2;

but since they are ptrs and an int can't store the different of 2 ptrs in
either 32 or 64bit (signed hasn't got enough range for the diff of 2
32bit values regardless of their type... we'd need 33bits or 65bits)

So changing this to the same logic.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bu5hm4n updated this revision to Diff 9887.Sep 17 2016, 6:22 AM
bu5hm4n retitled this revision from to eo: fix callback cmp.
bu5hm4n updated this object.
bu5hm4n edited the test plan for this revision. (Show Details)
bu5hm4n added reviewers: tasn, raster.

@raster this is fixing my issue ... I am looking at your patch and i am still wondering why your patch triggers it ... I dont get it ... Sorry for blaming you ...

tasn accepted this revision.EditedSep 19 2016, 3:34 AM
tasn edited edge metadata.

Nice catch. :)

Edit: btw, just to clarify, I didn't write that. :P (Phew, still bug free since 93').

This revision is now accepted and ready to land.Sep 19 2016, 3:34 AM
This revision was automatically updated to reflect the committed changes.