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); |
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 } |