Changeset 12


Ignore:
Timestamp:
Feb 13, 2009 2:07:09 PM (15 years ago)
Author:
hammonds
Message:

Code cleanup
Fix structure mistake for unpackTimeGet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • caPython/ca_internal_functions.c

    r9 r12  
    9494    func = PyTuple_GetItem(pyTup, 0);
    9595    if (PyCallable_Check(func)) {
    96 /*        SWIG_MakePtr(_ptemp, (char *) &(connect_args.chid),
    97  *        "_chid_p");*/
    9896        chidptr = SWIG_NewPointerObj( (void *) &(connect_args.chid),
    9997        SWIGTYPE_p_chid, 0);
     
    137135   
    138136    /* Create a swigged pointer to the channel identifier */
    139 /*    SWIG_MakePtr(_ptemp, (char *) &(event_args.chid), "_chid_p"); */
    140 /*    _ptemp = SWIG_NewPointerObj((char *) &(event_args.chid),
    141     SWIGTYPE_p_chid, 0);*/
    142137    chidptr = SWIG_NewPointerObj((char *) &(event_args.chid),
    143138    SWIGTYPE_p_chid, 0);
     
    474469    PyObject *d=NULL, *t=NULL, *pyVal=NULL;
    475470    int i;
    476     
     471 
    477472    if(1 == count) {
    478473        switch(dbrType) {
     
    605600                /* case DBR_STRING: No arrays of strings in EPICS*/
    606601                case DBR_TIME_CHAR:
    607                     pyVal = Py_BuildValue("b", (char)*(&(pBuf->gchrval.value) + i));
     602                    pyVal = Py_BuildValue("b", (char)*(&(pBuf->tchrval.value) + i));
    608603                    break;
    609604                case DBR_TIME_SHORT:
    610                     pyVal = Py_BuildValue("h", (short)*(&(pBuf->gshrtval.value) + i));
     605                    pyVal = Py_BuildValue("h", (short)*(&(pBuf->tshrtval.value) + i));
    611606                    break;
    612607                case DBR_TIME_ENUM:
    613                     pyVal = Py_BuildValue("h", (int)*(&(pBuf->genmval.value) +i));
     608                    pyVal = Py_BuildValue("h", (int)*(&(pBuf->tenmval.value) +i));
    614609                    break;
    615610                case DBR_TIME_LONG:
    616                     pyVal = Py_BuildValue("i", (long)*(&(pBuf->glngval.value) + i));
     611                    pyVal = Py_BuildValue("i", (long)*(&(pBuf->tlngval.value) + i));
    617612                    break;
    618613                case DBR_TIME_FLOAT:
    619                     pyVal = Py_BuildValue("f", (float)*(&(pBuf->gfltval.value) + i));
     614                    pyVal = Py_BuildValue("f", (float)*(&(pBuf->tfltval.value) + i));
    620615                    break;
    621616                case DBR_TIME_DOUBLE:
    622                     pyVal = Py_BuildValue("d", (double)*(&(pBuf->gdblval.value) + i));
     617                    pyVal = Py_BuildValue("d", (double)*(&(pBuf->tdblval.value) + i));
    623618                break;
    624619            } /* end switch */
     
    10791074                    break;
    10801075                case DBR_CTRL_FLOAT:
    1081                     pyVal = Py_BuildValue("d", (float)*(&(pBuf->cfltval.value) + i));
     1076                    pyVal = Py_BuildValue("f", (float)*(&(pBuf->cfltval.value) + i));
    10821077                    break;
    10831078                case DBR_CTRL_DOUBLE:
     
    11351130    }
    11361131
    1137 /*    SWIG_MakePtr(_ptemp, (char *) &(event_args.chid), "_chid_p");*/
    11381132    chidptr = SWIG_NewPointerObj((char *) &(event_args.chid),
    11391133    SWIGTYPE_p_chid, 0);
     
    12071201
    12081202    /* Create a swigged pointer to the channel identifier */
    1209 /*    SWIG_MakePtr(_ptemp, (char *) &(event_args.chid), "_chid_p");*/
    12101203    chidptr = SWIG_NewPointerObj((char *) &(event_args.chid),
    12111204    SWIGTYPE_p_chid, 0);
Note: See TracChangeset for help on using the changeset viewer.