Previously this was returning two values, a 'bool' and a data structure that is created. Now it simply returns the data structure which makes it easier to reason about who takes ownership of the memory and when, also that no address-of can be supplied that has any side-effect that interacts with how the method works / the returned result. -extern bool CIFParsePath(CIFPath **pathheadpp, int iscale); +extern CIFPath *CIFParsePath(int iscale); Previous related comments: Easier to reason about, there can be no interaction from *pathheadpp and the various functions called, which maybe the first concern to the next reader as visibility of new data is limited to that of a local variable of the function. |
||
|---|---|---|
| .. | ||
| CalmaRdcl.c | ||
| CalmaRdio.c | ||
| CalmaRdpt.c | ||
| CalmaRead.c | ||
| CalmaWrite.c | ||
| CalmaWriteZ.c | ||
| Makefile | ||
| calma.h | ||
| calmaInt.h | ||