Changeset 15003 for trunk/ippdb/src/ippdb.c
- Timestamp:
- Sep 24, 2007, 6:18:00 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/src/ippdb.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.c
r14598 r15003 19293 19293 static void magicInputSkyfileRowFree(magicInputSkyfileRow *object); 19294 19294 19295 magicInputSkyfileRow *magicInputSkyfileRowAlloc(psS64 magic_id, psS64 diff_id, psS32node)19295 magicInputSkyfileRow *magicInputSkyfileRowAlloc(psS64 magic_id, psS64 diff_id, const char *node) 19296 19296 { 19297 19297 magicInputSkyfileRow *_object; … … 19302 19302 _object->magic_id = magic_id; 19303 19303 _object->diff_id = diff_id; 19304 _object->node = node;19304 _object->node = psStringCopy(node); 19305 19305 19306 19306 return _object; … … 19309 19309 static void magicInputSkyfileRowFree(magicInputSkyfileRow *object) 19310 19310 { 19311 psFree(object->node); 19311 19312 } 19312 19313 … … 19324 19325 return false; 19325 19326 } 19326 if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_S 32, "AUTO_INCREMENT INDEX(magic_id, node)", 0)) {19327 if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_STRING, "INDEX(magic_id, node)", "64")) { 19327 19328 psError(PS_ERR_UNKNOWN, false, "failed to add item node"); 19328 19329 psFree(md); … … 19342 19343 } 19343 19344 19344 bool magicInputSkyfileInsert(psDB * dbh, psS64 magic_id, psS64 diff_id, psS32node)19345 bool magicInputSkyfileInsert(psDB * dbh, psS64 magic_id, psS64 diff_id, const char *node) 19345 19346 { 19346 19347 psMetadata *md = psMetadataAlloc(); … … 19355 19356 return false; 19356 19357 } 19357 if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_S 32, NULL, node)) {19358 if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_STRING, NULL, node)) { 19358 19359 psError(PS_ERR_UNKNOWN, false, "failed to add item node"); 19359 19360 psFree(md); … … 19466 19467 return false; 19467 19468 } 19468 if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_S 32, NULL, object->node)) {19469 if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_STRING, NULL, object->node)) { 19469 19470 psError(PS_ERR_UNKNOWN, false, "failed to add item node"); 19470 19471 psFree(md); … … 19490 19491 return false; 19491 19492 } 19492 psS32 node = psMetadataLookupS32(&status, md, "node");19493 char* node = psMetadataLookupPtr(&status, md, "node"); 19493 19494 if (!status) { 19494 19495 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item node");
Note:
See TracChangeset
for help on using the changeset viewer.
