src/server/plugins/postgresql/config.c

changeset 579
e10457d74fe1
parent 490
d218607f5a7e
equal deleted inserted replaced
578:eb48f716b31c 579:e10457d74fe1
258 node = node->next; 258 node = node->next;
259 } 259 }
260 260
261 // convert parserData 261 // convert parserData
262 if(!ret) { 262 if(!ret) {
263 size_t ntables = parserData.tables->size; 263 size_t ntables = cxListSize(parserData.tables);
264 repo->ntables = ntables; 264 repo->ntables = ntables;
265 repo->tables = pool_calloc(pool, ntables, sizeof(PgExtTable)); 265 repo->tables = pool_calloc(pool, ntables, sizeof(PgExtTable));
266 if(repo->tables) { 266 if(repo->tables) {
267 int i = 0; 267 int i = 0;
268 CxIterator iter = cxListIterator(parserData.tables); 268 CxIterator iter = cxListIterator(parserData.tables);
274 } 274 }
275 275
276 } 276 }
277 277
278 // cleanup parser 278 // cleanup parser
279 cxListDestroy(parserData.tables); 279 cxListFree(parserData.tables);
280 cxMapDestroy(parserData.table_lookup); 280 cxMapFree(parserData.table_lookup);
281 281
282 return ret; 282 return ret;
283 } 283 }
284 284
285 static int pg_ext_get_extension( 285 static int pg_ext_get_extension(
355 355
356 // exttable is only used temporarily 356 // exttable is only used temporarily
357 PgExtTable exttable; 357 PgExtTable exttable;
358 exttable.table = tabname; 358 exttable.table = tabname;
359 exttable.isused = 0; // not relevant in config 359 exttable.isused = 0; // not relevant in config
360 int tableindex = (int)ext->tables->size; 360 int tableindex = (int)cxListSize(ext->tables);
361 cxListAdd(ext->tables, &exttable); 361 cxListAdd(ext->tables, &exttable);
362 362
363 if(cxMapPut(ext->table_lookup, cx_hash_key_str(table), (void*)table)) { 363 if(cxMapPut(ext->table_lookup, cx_hash_key_str(table), (void*)table)) {
364 return 1; 364 return 1;
365 } 365 }

mercurial