Changeset 76


Ignore:
Timestamp:
Jun 2, 2009, 6:03:40 PM (11 years ago)
Author:
marchulsman
Message:

Change tmp field of node to calcfields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/qgraph.c

    r55 r76  
    2222    PyObject * table_attr;
    2323
    24     PyObject * tmp;
     24    PyObject * calcfields;
    2525    PyObject * in_trans;
    2626    PyObject * out_trans;
     
    3838    Py_XDECREF(self->actidx);
    3939    Py_XDECREF(self->props);
    40 
    41 
    4240    Py_XDECREF(self->table_attr);
     41
     42    Py_XDECREF(self->calcfields);
    4343    Py_XDECREF(self->in_trans);
    4444    Py_XDECREF(self->out_trans);
     
    316316
    317317static PyObject *
    318 Node_getTmp(Node *self, void *closure)
    319 {
    320     if(!self->in_actidx)
     318Node_getCalcFields(Node *self, void *closure)
     319{
     320    if(!self->calcfields)
    321321    {
    322322        Py_INCREF(Py_None);
    323         self->in_actidx = Py_None;
    324     }
    325     Py_INCREF(self->in_actidx);
    326     return self->in_actidx;
     323        self->calcfields = Py_None;
     324    }
     325    Py_INCREF(self->calcfields);
     326    return self->calcfields;
    327327}
    328328static int
    329 Node_setTmp(Node *self, PyObject *value, void *closure)
     329Node_setCalcFields(Node *self, PyObject *value, void *closure)
    330330{
    331331    PyObject *tmp;
    332     tmp = self->tmp;
     332    tmp = self->calcfields;
    333333    Py_INCREF(value);
    334     self->tmp = value;
     334    self->calcfields = value;
    335335    Py_XDECREF(tmp);
    336336    return 0;
     
    377377     "which field to use from input.",
    378378     NULL},
    379     {"tmp",
    380      (getter)Node_getTmp, (setter)Node_setTmp,
    381      "temporary variable used by query graph passes.",
     379    {"calcfields",
     380     (getter)Node_getCalcFields, (setter)Node_setCalcFields,
     381     "fields that can be calculated from other fields.",
    382382     NULL},
    383383    {NULL}  /* Sentinel */
Note: See TracChangeset for help on using the changeset viewer.