Enhance simpleAPI to allow array of pointers to subscripts (of type <ydb_buffer_t **>) (currently only <ydb_buffer_t *> is allowed)
Final Release Note
Description
The simpleAPI has various functions that allow for an array of subscripts to be passed. This is usually named "subsarray" and is of type "ydb_buffer_t *". But if one or more subscripts are common across different subscripted global references, it is currently necessary to copy the ydb_buffer_t structure corresponding to such a common subscript across various "subsarray" arrays in order to access the different subscripted global references. This is inconvenient to the user writing C programs using simpleAPI. And also a performance issue since a lot of buffer copies have to be done from one ydb_buffer_t structure to another.
To avoid this, the following additional enhancement to the simpleAPI is proposed where one can pass an array of pointers to subscripts (i.e. an array of "ydb_buffer_t *" pointers) as the subscript array. This lets one reuse a common subscript across different global references by just copying the pointer across the various subscript arrays (no buffer copies).
All ydb_*s() functions that have a "subsarray" parameter of type "ydb_buffer_t *" now have a ydb*2_s() counterpart which lets one pass a "subsptrarray" parameter of type "ydb_buffer_t **". subsptrarray[0], subsptrarray[1] etc. are each pointers to ydb_buffer_t structures that are used as subscripts for the array. The number of subscripts is controlled by the same parameter as before "subs_used" etc.
int ydb_data2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray, unsigned int *ret_value);
int ydb_delete2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray, int deltype);
int ydb_lock_incr2_s(unsigned long long timeout_nsec, ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray);
int ydb_lock_decr2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray);
int ydb_set2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray, ydb_buffer_t *value);
int ydb_get2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray, ydb_buffer_t *ret_value);
int ydb_subscript_next2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray, ydb_buffer_t *ret_value);
int ydb_subscript_previous2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray, ydb_buffer_t *ret_value);
int ydb_node_next2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray, int *ret_subs_used, ydb_buffer_t **ret_subsptrarray);
int ydb_node_previous2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray, int *ret_subs_used, ydb_buffer_t **ret_subsptrarray);
int ydb_incr2_s(ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray, ydb_buffer_t *increment, ydb_buffer_t *ret_value);
int ydb_lock2_s(unsigned long long timeout_nsec, int namecount[, ydb_buffer_t *varname, int subs_used, ydb_buffer_t **subsptrarray] ...);