295: drmaa2_list_get(.., int pos) -> pos should be const, the implementation does not need to change it
- 297 int pos -> same
- 549 char **substate -> the user has to free it with "drmaa2_string_free()". Since it is just a string the user might "forget" this and use
a "normal" free. Hence I would recommend to have a drmaa2_string type because all other data (which has to be freed) is drmaa2 typed.
General question: I would like to have the free functions to NULL the freed pointers (in order to minimize the risk with
dangling pointers). Hence I would change *all* free methods to accept ** arguments. Wouldn't this be reasonable?
Why should the user always do the NULL'ing itself? He might forget or be just lazy and running later in problems, which
we could avoid easily.
Example:
drmaa2_list_free(&list);
/* some code later, I want to do something with list again, but not sure if it was freed already */
...
if (list == NULL) {
/* oh it was freed already */
} else {
/* not feed */
}
Thanks,