In 1.6.1, TransformPoints got a python typemap such that a list of tuples can 
be transformed.
I want to make it a little bit more general, such that the inner tuples can be 
lists as well.
While looking at the typemap, I have the following questions:

- Why is there an explicit check on Py_None? Py_None will fail the next test 
anyway and the
  error message is not entirely true since a tuple is a sequence as well (and 
works).

- Memory is allocated with CPLMalloc; in some other typemaps it is plain 
malloc. In the latter
  case, there is no check on allocation failures. Should these be replaced by 
CPLMalloc?
 
- If CPLMalloc fails, it calls a memory allocation failure hook (according to 
the docs). The
  default is to terminate the application; shouldn't this hook raise a python 
memory exception?

- The transformpoints typemap returns a tuple of 2 lists. In general, python 
functions return
  tuples. Is there a reason to return lists in this case?

Regards,

Rene Hogendoorn
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to