Changeset 121
- Timestamp:
- 03/05/08 17:18:09 (9 months ago)
- Files:
-
- trunk/core/src/astar.c (modified) (1 diff)
- trunk/core/src/dijkstra.c (modified) (2 diffs)
- trunk/core/src/shooting_star.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/core/src/astar.c
r112 r121 532 532 char* nulls; 533 533 534 DBG("Before allocation\n");535 534 /* This will work for some compilers. If it crashes with segfault, try to change the following block with this one 535 536 536 values = palloc(4 * sizeof(Datum)); 537 537 nulls = palloc(4 * sizeof(char)); 538 539 DBG("After allocation\n"); 540 538 541 539 values[0] = call_cntr; 542 540 nulls[0] = ' '; 543 541 values[1] = Int32GetDatum(path[call_cntr].vertex_id); 544 542 nulls[1] = ' '; 545 values[2] = Int32GetDatum(path[call_cntr].edge_id);543 values[2] = Int32GetDatum(path[call_cntr].edge_id); 546 544 nulls[2] = ' '; 547 545 values[3] = Float8GetDatum(path[call_cntr].cost); 548 546 nulls[3] = ' '; 549 547 */ 548 549 values = palloc(3 * sizeof(Datum)); 550 nulls = palloc(3 * sizeof(char)); 551 552 values[0] = Int32GetDatum(path[call_cntr].vertex_id); 553 nulls[0] = ' '; 554 values[1] = Int32GetDatum(path[call_cntr].edge_id); 555 nulls[1] = ' '; 556 values[2] = Float8GetDatum(path[call_cntr].cost); 557 nulls[2] = ' '; 558 550 559 DBG("Heap making\n"); 551 560 trunk/core/src/dijkstra.c
r112 r121 419 419 char* nulls; 420 420 421 /* This will work for some compilers. If it crashes with segfault, try to change the following block with this one 422 421 423 values = palloc(4 * sizeof(Datum)); 422 424 nulls = palloc(4 * sizeof(char)); 423 424 425 425 426 values[0] = call_cntr; 426 427 nulls[0] = ' '; … … 431 432 values[3] = Float8GetDatum(path[call_cntr].cost); 432 433 nulls[3] = ' '; 433 434 */ 435 436 values = palloc(3 * sizeof(Datum)); 437 nulls = palloc(3 * sizeof(char)); 438 439 values[0] = Int32GetDatum(path[call_cntr].vertex_id); 440 nulls[0] = ' '; 441 values[1] = Int32GetDatum(path[call_cntr].edge_id); 442 nulls[1] = ' '; 443 values[2] = Float8GetDatum(path[call_cntr].cost); 444 nulls[2] = ' '; 445 434 446 tuple = heap_formtuple(tuple_desc, values, nulls); 435 447 trunk/core/src/shooting_star.c
r112 r121 518 518 char* nulls; 519 519 520 /* This will work for some compilers. If it crashes with segfault, try to change the following block with this one 521 520 522 values = palloc(4 * sizeof(Datum)); 521 523 nulls = palloc(4 * sizeof(char)); 522 523 524 524 525 values[0] = call_cntr; 525 526 nulls[0] = ' '; … … 530 531 values[3] = Float8GetDatum(path[call_cntr].cost); 531 532 nulls[3] = ' '; 532 533 */ 534 535 values = palloc(3 * sizeof(Datum)); 536 nulls = palloc(3 * sizeof(char)); 537 538 values[0] = Int32GetDatum(path[call_cntr].vertex_id); 539 nulls[0] = ' '; 540 values[1] = Int32GetDatum(path[call_cntr].edge_id); 541 nulls[1] = ' '; 542 values[2] = Float8GetDatum(path[call_cntr].cost); 543 nulls[2] = ' '; 544 533 545 tuple = heap_formtuple(tuple_desc, values, nulls); 534 546

