[NumPy-Tickets] [NumPy] #1770: Segfault with python 3.2 structured array non-existent field

NumPy Trac numpy-tickets@scipy....
Thu Mar 17 20:27:25 CDT 2011

#1770: Segfault with python 3.2 structured array non-existent field
  Reporter:  matthew.brett  |       Owner:  somebody   
      Type:  defect         |      Status:  reopened   
  Priority:  normal         |   Milestone:  Unscheduled
 Component:  Other          |     Version:  devel      
Resolution:                 |    Keywords:             

Comment(by charris):

 I think PyString_AsString already does the unicode decoding:

 char* PyString_AsString(PyObject *string)¶
     Return a NUL-terminated representation of the contents of string. The
 pointer refers to the internal buffer of string, not a copy. The data must
 not be modified in any way, unless the string was just created using
 PyString_FromStringAndSize(NULL, size). It must not be deallocated. If
 string is a Unicode object, this function computes the default encoding of
 string and operates on that. If string is not a string object at all,
 PyString_AsString() returns NULL and raises TypeError.

 Does the return does need to be checked for NULL?

Ticket URL: <http://projects.scipy.org/numpy/ticket/1770#comment:7>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list