Changeset 653
- Timestamp:
- 09/30/08 09:08:32 (2 months ago)
- Files:
-
- trunk/pywcs/src/pywcs.c (modified) (5 diffs)
- trunk/pywcs/src/util.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pywcs/src/pywcs.c
r652 r653 100 100 &py_distortion_lookup[0], 101 101 &py_distortion_lookup[1], 102 &py_wcsprm)) 102 &py_wcsprm)) { 103 103 return -1; 104 } 104 105 105 106 /* Check and set SIP */ … … 240 241 } 241 242 242 if (do_shift) 243 if (do_shift) { 243 244 offset_array(pixcrd, 1.0); 245 } 244 246 245 247 status = p4_pix2foc(2, (void *)self->x.cpdis, PyArray_DIM(pixcrd, 0), … … 251 253 } 252 254 253 if (do_shift) 255 if (do_shift) { 254 256 offset_array(pixcrd, -1.0); 257 } 255 258 256 259 _exit: … … 303 306 } 304 307 305 if (do_shift) 308 if (do_shift) { 306 309 offset_array(pixcrd, 1.0); 310 } 307 311 308 312 status = pipeline_pix2foc(&self->x, … … 317 321 } 318 322 319 if (do_shift) 323 if (do_shift) { 320 324 offset_array(pixcrd, -1.0); 325 } 321 326 322 327 _exit: trunk/pywcs/src/util.c
r564 r653 39 39 40 40 PyObject* 41 PyArrayProxy_New(PyObject* self, int nd, const npy_intp* dims, 42 int typenum, const void* data) { 41 PyArrayProxy_New( 42 PyObject* self, int nd, const npy_intp* dims, 43 int typenum, const void* data) { 43 44 PyArray_Descr* type_descr = NULL; 44 45 PyObject* result = NULL; … … 48 49 return NULL; 49 50 50 result = (PyObject*)PyArray_NewFromDescr(&PyArray_Type, type_descr, 51 nd, (npy_intp*)dims, NULL, (void*)data, 52 NPY_CONTIGUOUS | NPY_WRITEABLE, 53 NULL); 51 result = (PyObject*)PyArray_NewFromDescr( 52 &PyArray_Type, 53 type_descr, 54 nd, (npy_intp*)dims, 55 NULL, 56 (void*)data, 57 NPY_CONTIGUOUS | NPY_WRITEABLE, 58 NULL); 54 59 55 60 if (result == NULL) … … 128 133 */ 129 134 130 static void135 static inline void 131 136 wcsprm_fix_values(struct wcsprm* x, value_fixer_t value_fixer) { 132 137 int naxis = x->naxis; … … 373 378 char* str_char = NULL; 374 379 Py_ssize_t str_len = 0; 375 int i= 0;380 int i = 0; 376 381 377 382 if (check_delete(propname, value)) { … … 426 431 /* Theoretically, something has gone really wrong here, since 427 432 we've already verified the list. */ 428 PyErr_Format(PyExc_RuntimeError, "Input values have changed underneath us. Something is seriously wrong."); 433 PyErr_Format( 434 PyExc_RuntimeError, 435 "Input values have changed underneath us. Something is seriously wrong."); 429 436 return -1; 430 437 } … … 434 441 /* Theoretically, something has gone really wrong here, since 435 442 we've already verified the list. */ 436 PyErr_Format(PyExc_RuntimeError, "Input values have changed underneath us. Something is seriously wrong."); 443 PyErr_Format( 444 PyExc_RuntimeError, 445 "Input values have changed underneath us. Something is seriously wrong."); 437 446 Py_DECREF(str); 438 447 return -1; … … 449 458 PyObject* 450 459 get_pscards(const char* propname, struct pscard* ps, int nps) { 451 PyObject* result = NULL;460 PyObject* result = NULL; 452 461 PyObject* subresult = NULL; 453 int i= 0;462 int i = 0; 454 463 455 464 result = PyList_New(nps); … … 534 543 PyObject* 535 544 get_pvcards(const char* propname, struct pvcard* pv, int npv) { 536 PyObject* result = NULL;545 PyObject* result = NULL; 537 546 PyObject* subresult = NULL; 538 int i= 0;547 int i = 0; 539 548 540 549 result = PyList_New(npv);
