fbed1b21d6
Functions that end up calling a `malloc' or `realloc' return the new struct `Result' which indicates if the memory allocation or reallocation worked or not. If not, it holds a message, otherwise it holds the value the function is meant to return (can be a null pointer if the function returned a `void' before). The library will no longer forcibly exit the program on such error in case it can be recovered by the code calling it. The modifications described above lead to vector-creating functions returning a pointer to the newly created vector, and the function for deleting vectors also frees the vector. This commit also inlines some functions to make the compiled code a bit lighter and calls to these functions possibly a bit faster. `PDEB' is redefined following the new `PCOMMON' macro that is also used by `PERR' for desplaying debug error messages. Some lines are also modified to avoid potential memory leaks in case of a memory (re)allocation.
Description
Languages
C
88.3%
Meson
11.7%