[Python-3000-checkins] r65862 - in python/branches/py3k: Include/memoryobject.h Misc/NEWS Modules/_json.c Objects/memoryobject.c Objects/unicodeobject.c

Nick Coghlan ncoghlan at gmail.com
Wed Aug 20 12:38:17 CEST 2008


Antoine Pitrou wrote:
> 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.

Ah, good point. What has been implemented seems fine then.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
            http://www.boredomandlaziness.org


More information about the Python-3000-checkins mailing list