Changeset 119
- Timestamp:
- 03/05/08 17:15:23 (9 months ago)
- Files:
-
- trunk/extra/driving_distance/src/alpha.c (modified) (1 diff)
- trunk/extra/driving_distance/src/drivedist.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/extra/driving_distance/src/alpha.c
r113 r119 331 331 char* nulls; 332 332 333 DBG("Before allocation\n"); 334 333 /* This will work for some compilers. If it crashes with segfault, try to change the following block with this one 334 335 values = palloc(4 * sizeof(Datum)); 336 nulls = palloc(4 * sizeof(char)); 337 338 values[0] = call_cntr; 339 nulls[0] = ' '; 340 values[1] = Int32GetDatum(path[call_cntr].vertex_id); 341 nulls[1] = ' '; 342 values[2] = Int32GetDatum(path[call_cntr].edge_id); 343 nulls[2] = ' '; 344 values[3] = Float8GetDatum(path[call_cntr].cost); 345 nulls[3] = ' '; 346 */ 347 335 348 values = palloc(3 * sizeof(Datum)); 336 349 nulls = palloc(3 * sizeof(char)); 337 350 338 DBG("After allocation\n"); 339 340 values[0] = call_cntr; 351 values[0] = Int32GetDatum(path[call_cntr].vertex_id); 341 352 nulls[0] = ' '; 342 343 values[1] = Float8GetDatum(res[call_cntr].x); 353 values[1] = Int32GetDatum(path[call_cntr].edge_id); 344 354 nulls[1] = ' '; 345 346 values[2] = Float8GetDatum(res[call_cntr].y); 355 values[2] = Float8GetDatum(path[call_cntr].cost); 347 356 nulls[2] = ' '; 348 357 349 358 DBG("Heap making\n"); 350 359 trunk/extra/driving_distance/src/drivedist.c
r113 r119 435 435 char* nulls; 436 436 437 /* This will work for some compilers. If it crashes with segfault, try to change the following block with this one 437 438 438 439 values = palloc(4 * sizeof(Datum)); 439 440 nulls = palloc(4 * sizeof(char)); 440 441 441 442 values[0] = call_cntr; 442 443 nulls[0] = ' '; … … 447 448 values[3] = Float8GetDatum(path[call_cntr].cost); 448 449 nulls[3] = ' '; 450 */ 451 452 values = palloc(3 * sizeof(Datum)); 453 nulls = palloc(3 * sizeof(char)); 454 455 values[0] = Int32GetDatum(path[call_cntr].vertex_id); 456 nulls[0] = ' '; 457 values[1] = Int32GetDatum(path[call_cntr].edge_id); 458 nulls[1] = ' '; 459 values[2] = Float8GetDatum(path[call_cntr].cost); 460 nulls[2] = ' '; 449 461 450 462 tuple = heap_formtuple(tuple_desc, values, nulls);

