[Python-3000-checkins] r65862 - in python/branches/py3k: Include/memoryobject.h Misc/NEWS Modules/_json.c Objects/memoryobject.c Objects/unicodeobject.c
Georg Brandl
g.brandl at gmx.net
Wed Aug 20 23:00:03 CEST 2008
Antoine Pitrou schrieb:
> Nick Coghlan <ncoghlan <at> gmail.com> writes:
>>
>> antoine.pitrou wrote:
>> > +/* The struct is declared here so that macros can work, but it shouldn't
>> > + be considered public. Don't access those fields directly, use the macros
>> > + and functions instead! */
>> > +typedef struct {
>> > + PyObject_HEAD
>> > + PyObject *base;
>> > + Py_buffer view;
>> > +} PyMemoryViewObject;
>>
>> If we don't want people to use this struct directly, we should start the
>> name with an underscore.
>
> Well, they can use it as an opaque pointer (PyMemoryViewObject *), just not
> access the fields directly. I don't know what the convention should be in that
> case, but feel free to make the necessary changes.
Well, logically it would be field names starting with underscores.
Just kidding,
Georg
More information about the Python-3000-checkins
mailing list