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

Antoine Pitrou solipsis at pitrou.net
Wed Aug 20 12:27:42 CEST 2008


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.

cheers

Antoine.




More information about the Python-3000-checkins mailing list