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;
>
>
>
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com