[Python-3000] Py3k-buffer branch merged back to py3k branch

Travis Oliphant oliphant at enthought.com
Tue Aug 21 18:16:15 CEST 2007


Lisandro Dalcin wrote:
> Travis, I had no much time to follow you on py3k-buffer branch, but
> now you merged in py3k, I want to make an small comment for your
> consideration.
>> Pehaps the 'PyBuffer' struct could be named different, something like
> 'Py_buffer'. The use case has some similarites to 'Py_complex' struct.
> It is no related to any 'PyObject*', but to a public structure wich,
> (if I understand right) can be declared and used in static storage.
>> In short, I am propossing the naming below. Note I removed
> 'bufferinfo' in the typedef line, as it seems to be not needed and it
> only appears here after grepping in sources) and could conflict with
> user code.
>
I have no problems with these changes. I will be unable to do them 
myself though this week.
-Travis
> /* buffer interface */
> typedef struct {
> .....
> } Py_buffer;
>> typedef struct {
> PyObject_HEAD
> PyObject *base;
> Py_buffer view;
> } PyMemoryViewObject;
>>> Again, taking complex as an example, please note the symmetry:
>>> typedef struct {
> double real;
> double imag;
> } Py_complex;
>> typedef struct {
> PyObject_HEAD
> Py_complex cval;
> } PyComplexObject;
>>>


More information about the Python-3000 mailing list

AltStyle によって変換されたページ (->オリジナル) /