Changeset 120
- Timestamp:
- 03/05/08 17:15:59 (9 months ago)
- Files:
-
- trunk/extra/tsp/src/tsp.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/extra/tsp/src/tsp.c
r114 r120 434 434 char* nulls; 435 435 436 DBG("Before allocation\n"); 437 438 values = (Datum*)palloc(4*sizeof(Datum)); 439 nulls = (char*)palloc(4*sizeof(char)); 440 441 DBG("After allocation\n"); 442 436 /* This will work for some compilers. If it crashes with segfault, try to change the following block with this one 437 438 values = palloc(4 * sizeof(Datum)); 439 nulls = palloc(4 * sizeof(char)); 443 440 444 441 values[0] = call_cntr; … … 450 447 values[3] = Float8GetDatum(path[call_cntr].cost); 451 448 nulls[3] = ' '; 449 */ 450 451 values = palloc(3 * sizeof(Datum)); 452 nulls = palloc(3 * sizeof(char)); 453 454 values[0] = Int32GetDatum(path[call_cntr].vertex_id); 455 nulls[0] = ' '; 456 values[1] = Int32GetDatum(path[call_cntr].edge_id); 457 nulls[1] = ' '; 458 values[2] = Float8GetDatum(path[call_cntr].cost); 459 nulls[2] = ' '; 452 460 453 461 DBG("Heap making\n");

