[Python-checkins] CVS: python/dist/src/Doc/ext newtypes.tex,1.11,1.12

Fred L. Drake fdrake@users.sourceforge.net
Tue, 02 Apr 2002 07:42:49 -0800


Update of /cvsroot/python/python/dist/src/Doc/ext
In directory usw-pr-cvs1:/tmp/cvs-serv15304/ext

Modified Files:
	newtypes.tex 
Log Message:
Add a note warning against semicolons following PyObject_HEAD.
Minor cleanups.


Index: newtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/newtypes.tex,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** newtypes.tex	29 Mar 2002 22:45:28 -0000	1.11
--- newtypes.tex	2 Apr 2002 15:42:46 -0000	1.12
***************
*** 60,66 ****
  object.  These are the fields the \code{PyObject_HEAD} macro brings
  in.  The reason for the macro is to standardize the layout and to
! enable special debugging fields to be brought in debug builds.
  
! For contrast
  
  \begin{verbatim}
--- 60,72 ----
  object.  These are the fields the \code{PyObject_HEAD} macro brings
  in.  The reason for the macro is to standardize the layout and to
! enable special debugging fields in debug builds.  Note that there is
! no semicolon after the \code{PyObject_HEAD} macro; one is included in
! the macro definition.  Be wary of adding one by accident; it's easy to
! do from habit, and your compiler might not complain, but someone
! else's probably will!  (On Windows, MSVC is known to call this an
! error and refuse to produce compiled code.)
  
! For contrast, let's take a look at the corresponding definition for
! standard Python integers:
  
  \begin{verbatim}
***************
*** 71,76 ****
  \end{verbatim}
  
- is the corresponding definition for standard Python integers.
- 
  Next up is:
  
--- 77,80 ----
***************
*** 492,496 ****
  
  
! \subsection{Attribute Management Functions}
  
  For every object which can support attributes, the corresponding type
--- 496,500 ----
  
  
! \subsection{Attribute Management}
  
  For every object which can support attributes, the corresponding type