Changeset 12394 for trunk/psLib/src/db/psDB.c
- Timestamp:
- Mar 9, 2007, 3:24:40 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/db/psDB.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/db/psDB.c
r12223 r12394 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.13 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2007-03- 05 21:17:34$14 * @version $Revision: 1.139 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2007-03-10 01:24:40 $ 16 16 * 17 17 * Copyright (C) 2005-2006 Joshua Hoblitt, University of Hawaii … … 416 416 dataSize = *(mysql_fetch_lengths(result)); 417 417 418 // represent NULL as a n emptystring418 // represent NULL as a NULL string 419 419 if (row[0] == NULL) { 420 data = psStringCopy(""); 421 } else { 422 data = psAlloc(dataSize+1); 423 memcpy(data, row[0], dataSize); 424 ((char*)data)[dataSize] = '\0'; 425 } 420 psArrayAdd(column, 0, NULL); 421 continue; 422 } 423 424 // make a copy of the data 425 data = psAlloc(dataSize+1); 426 memcpy(data, row[0], dataSize); 427 ((char*)data)[dataSize] = '\0'; 426 428 427 429 // add field to return array … … 441 443 { \ 442 444 psPtr myNaN; \ 443 int i; \444 445 \ 445 for ( i = 0; i < source->n; i++) { \446 if (s trlen(source->data[i])) { \446 for (long i = 0; i < source->n; i++) { \ 447 if (source->data[i]) { \ 447 448 dest[i] = (type)conv(source->data[i]); \ 448 449 } else { \
Note:
See TracChangeset
for help on using the changeset viewer.
