Changeset 644

Show
Ignore:
Timestamp:
09/29/08 11:55:19 (2 months ago)
Author:
mdroe
Message:

Minor code reduction.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pywcs/src/distortion_wrap.c

    r643 r644  
    177177  return PyFloat_FromDouble(result); 
    178178} 
    179  
    180 static PyMemberDef PyDistLookup_members[] = { 
    181   {NULL} 
    182 }; 
    183179 
    184180static PyGetSetDef PyDistLookup_getset[] = { 
     
    225221  0,                            /* tp_iternext */ 
    226222  PyDistLookup_methods,         /* tp_methods */ 
    227   PyDistLookup_members,         /* tp_members */ 
     223  0,                            /* tp_members */ 
    228224  PyDistLookup_getset,          /* tp_getset */ 
    229225  0,                            /* tp_base */ 
  • trunk/pywcs/src/pipeline.c

    r643 r644  
    136136                    wcs_input, imgcrd, phi, theta, wcs_output, stat); 
    137137  } else { 
    138     status = pipeline_pix2foc(pipeline, ncoord, nelem, pixcrd, world); 
     138    if (has_sip || has_p4) { 
     139      status = pipeline_pix2foc(pipeline, ncoord, nelem, pixcrd, world); 
     140    } 
    139141  } 
    140142 
  • trunk/pywcs/src/pipeline.h

    r643 r644  
    4949 
    5050/** 
    51  Initialize all the values in a pipeline_t to NULL. 
     51Initialize all the values in a pipeline_t to NULL. 
    5252*/ 
    5353void 
     
    5656 
    5757/** 
    58  Set all the values of a pipeline_t. 
     58Set all the values of a pipeline_t. 
    5959*/ 
    6060void 
  • trunk/pywcs/src/pywcs.c

    r643 r644  
    156156 
    157157static PyObject* 
    158 PyWcs_repr(PyWcs* self) { 
    159   return PyString_FromFormat("<Wcs object>"); 
    160 } 
    161  
    162 static PyObject* 
    163158PyWcs_all_pix2sky_generic(PyWcs* self, PyObject* arg, int do_shift) { 
    164159  PyArrayObject* pixcrd  = NULL; 
     
    486481 */ 
    487482 
    488 static PyMemberDef PyWcs_members[] = { 
    489   {NULL} 
    490 }; 
    491  
    492483static PyGetSetDef PyWcs_getset[] = { 
    493484  {"cpdis1", (getter)PyWcs_get_cpdis1, (setter)PyWcs_set_cpdis1, (char *)doc_cpdis1}, 
     
    519510  0,                            /*tp_setattr*/ 
    520511  0,                            /*tp_compare*/ 
    521   (reprfunc)PyWcs_repr,         /*tp_repr*/ 
     512  0,                            /*tp_repr*/ 
    522513  0,                            /*tp_as_number*/ 
    523514  0,                            /*tp_as_sequence*/ 
     
    525516  0,                            /*tp_hash */ 
    526517  0,                            /*tp_call*/ 
    527   (reprfunc)PyWcs_repr,         /*tp_str*/ 
     518  0,                            /*tp_str*/ 
    528519  0,                            /*tp_getattro*/ 
    529520  0,                            /*tp_setattro*/ 
     
    538529  0,                            /* tp_iternext */ 
    539530  PyWcs_methods,                /* tp_methods */ 
    540   PyWcs_members,                /* tp_members */ 
     531  0,                            /* tp_members */ 
    541532  PyWcs_getset,                 /* tp_getset */ 
    542533  0,                            /* tp_base */ 
  • trunk/pywcs/src/wcslib_wrap.c

    r643 r644  
    219219    return 0; 
    220220  } 
    221 } 
    222  
    223 static PyObject* 
    224 PyWcsprm_repr(PyWcsprm* self) { 
    225   if (is_null(self->x.wcsname)) { 
    226     return NULL; 
    227   } 
    228  
    229   return PyString_FromFormat("<Wcsprm object '%s'>", self->x.wcsname); 
    230221} 
    231222 
     
    18131804 * PyWcsprm definition structures 
    18141805 */ 
    1815  
    1816 static PyMemberDef PyWcsprm_members[] = { 
    1817   {NULL} 
    1818 }; 
    18191806 
    18201807static PyGetSetDef PyWcsprm_getset[] = { 
     
    19071894  0,                            /*tp_setattr*/ 
    19081895  0,                            /*tp_compare*/ 
    1909   (reprfunc)PyWcsprm_repr,      /*tp_repr*/ 
     1896  0,                            /*tp_repr*/ 
    19101897  0,                            /*tp_as_number*/ 
    19111898  0,                            /*tp_as_sequence*/ 
     
    19131900  0,                            /*tp_hash */ 
    19141901  0,                            /*tp_call*/ 
    1915   (reprfunc)PyWcsprm_repr,      /*tp_str*/ 
     1902  0,                            /*tp_str*/ 
    19161903  0,                            /*tp_getattro*/ 
    19171904  0,                            /*tp_setattro*/ 
     
    19261913  0,                            /* tp_iternext */ 
    19271914  PyWcsprm_methods,             /* tp_methods */ 
    1928   PyWcsprm_members,             /* tp_members */ 
     1915  0,                            /* tp_members */ 
    19291916  PyWcsprm_getset,              /* tp_getset */ 
    19301917  0,                            /* tp_base */