rizin icon indicating copy to clipboard operation
rizin copied to clipboard

Refactor `RzTable` API and implementation

Open XVilka opened this issue 3 years ago • 2 comments

  • [ ] Provide the API to set a particular value given the names of the column and the row (overwrite if exists, adds if not)
  • [ ] Provide the API to set a particular value given the indexes of the column and the row (overwrite if exists, adds if not)
  • [ ] Provide the API to add a particular value given the names of the column and the row without overwriting
  • [ ] Provide the API to add a particular value given the indexes of the column and the row without overwriting
  • [ ] Provide the API to form a table/row/column given the HtPP/HtUP/HtUU as an argument
  • [ ] Switch the internal storage of the RzTable from RzList to either vectors or hashtable (HtPP or something like that)
  • [ ] Implement tests for these and other missing APIs

See these files:

  • librz/util/table.c
  • librz/include/rz_util/rz_table.h
  • test/unit/test_table.c

XVilka avatar Nov 11 '21 05:11 XVilka

Do the names/indexes mean one can pass multiple names/indexes?

So the function signature looks like: bool rz_table_set_val(RzTable *t, RZList *items, const char *arg, ...)

PeiweiHu avatar Nov 26 '21 07:11 PeiweiHu

Yes

XVilka avatar Feb 02 '22 03:02 XVilka

This issue has been automatically marked as stale because it has not had recent activity. Considering a lot has probably changed since its creation, we kindly ask you to check again if the issue you reported is still relevant in the current version of rizin. If it is, update this issue with a comment, otherwise it will be automatically closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 07 '22 08:08 stale[bot]