Add a new entry and return its pointer so that the caller can populate * it with data. */
| 63 | /* Add a new entry and return its pointer so that the caller can populate |
| 64 | * it with data. */ |
| 65 | geoPoint *geoArrayAppend(geoArray *ga) { |
| 66 | if (ga->used == ga->buckets) { |
| 67 | ga->buckets = (ga->buckets == 0) ? 8 : ga->buckets*2; |
| 68 | ga->array = (geoPoint*)zrealloc(ga->array,sizeof(geoPoint)*ga->buckets, MALLOC_SHARED); |
| 69 | } |
| 70 | geoPoint *gp = ga->array+ga->used; |
| 71 | ga->used++; |
| 72 | return gp; |
| 73 | } |
| 74 | |
| 75 | /* Destroy a geoArray created with geoArrayCreate(). */ |
| 76 | void geoArrayFree(geoArray *ga) { |
no test coverage detected