radareorg / sdb

Simple and fast string based key-value database with support for arrays and json
https://www.radare.org/
MIT License
218 stars 62 forks source link

parent Sdb* pointer for SdbCallback #148

Closed XVilka closed 3 years ago

XVilka commented 6 years ago

To be able to pass something more than just parent sdb, or struct containing it in sdb_foreach() in userdata pointer.

radare commented 6 years ago

just pass this into the void* arg, for callback patterns it is better to only pass 1 argument, most projects do it like this for simplicity and consistency

On 1 Nov 2017, at 09:19, Anton Kochkov notifications@github.com wrote:

To be able to pass something more than just parent sdb, or struct containing it in sdb_foreach()

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/radare/sdb/issues/148, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-ljae9Wyjyw49f7vZ5HUOhv6QJduKks5syCmdgaJpZM4QN4Y9.

XVilka commented 6 years ago

This is what I did - I passed RAnal, which contains a link to the parent SDB, also some other useful stuff, but still.

radare commented 6 years ago

Yeah i understand your frustation :D

On 1 Nov 2017, at 13:08, Anton Kochkov notifications@github.com wrote:

This is what I did - I passed RAnal, which contains a link to the parent SDB, also some other useful stuff, but still.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.