pgRouting

Changeset 119

Show
Ignore:
Timestamp:
03/05/08 17:15:23 (9 months ago)
Author:
anton
Message:

Rolled back to the previous tuple scheme

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/extra/driving_distance/src/alpha.c

    r113 r119  
    331331      char* nulls; 
    332332 
    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     
    335348      values = palloc(3 * sizeof(Datum)); 
    336349      nulls = palloc(3 * sizeof(char)); 
    337350 
    338       DBG("After allocation\n"); 
    339  
    340       values[0] = call_cntr; 
     351      values[0] = Int32GetDatum(path[call_cntr].vertex_id); 
    341352      nulls[0] = ' '; 
    342  
    343       values[1] = Float8GetDatum(res[call_cntr].x); 
     353      values[1] = Int32GetDatum(path[call_cntr].edge_id); 
    344354      nulls[1] = ' '; 
    345  
    346       values[2] = Float8GetDatum(res[call_cntr].y); 
     355      values[2] = Float8GetDatum(path[call_cntr].cost); 
    347356      nulls[2] = ' '; 
    348  
     357         
    349358      DBG("Heap making\n"); 
    350359 
  • trunk/extra/driving_distance/src/drivedist.c

    r113 r119  
    435435    char* nulls; 
    436436     
     437    /* This will work for some compilers. If it crashes with segfault, try to change the following block with this one     
    437438 
    438439    values = palloc(4 * sizeof(Datum)); 
    439440    nulls = palloc(4 * sizeof(char)); 
    440      
     441 
    441442    values[0] = call_cntr; 
    442443    nulls[0] = ' '; 
     
    447448    values[3] = Float8GetDatum(path[call_cntr].cost); 
    448449    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] = ' '; 
    449461       
    450462    tuple = heap_formtuple(tuple_desc, values, nulls);