[Python-checkins] CVS: python/dist/src/Doc/ext ext.tex,1.68.2.6,1.68.2.7

Fred L. Drake fdrake@weyr.cnri.reston.va.us
Tue, 29 Feb 2000 13:40:58 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Doc/ext
In directory weyr:/home/fdrake/projects/python/Doc-152p2/ext

Modified Files:
      Tag: release152p1-patches
	ext.tex 
Log Message:

Integrate some feedback from Eddy Welbourne <eddyw@lsl.co.uk>:

  - extraneous "by" in text around a simple example
  - don't imply that errno is Unix-specific; it's ANSI C
  - clarify statement about malloc() & realloc() callers needing to
    raise the appropriate exception


Index: ext.tex
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/ext/ext.tex,v
retrieving revision 1.68.2.6
retrieving revision 1.68.2.7
diff -C2 -r1.68.2.6 -r1.68.2.7
*** ext.tex	2000/02/16 17:25:40	1.68.2.6
--- ext.tex	2000/02/29 18:40:55	1.68.2.7
***************
*** 163,167 ****
  whose addresses are passed.  It returns false (zero) if an invalid
  argument list was passed.  In the latter case it also raises an
! appropriate exception by so the calling function can return
  \NULL{} immediately (as we saw in the example).
  
--- 163,167 ----
  whose addresses are passed.  It returns false (zero) if an invalid
  argument list was passed.  In the latter case it also raises an
! appropriate exception so the calling function can return
  \NULL{} immediately (as we saw in the example).
  
***************
*** 196,200 ****
  Another useful function is \cfunction{PyErr_SetFromErrno()}, which only
  takes an exception argument and constructs the associated value by
! inspection of the (\UNIX{}) global variable \cdata{errno}.  The most
  general function is \cfunction{PyErr_SetObject()}, which takes two object
  arguments, the exception and its associated value.  You don't need to
--- 196,200 ----
  Another useful function is \cfunction{PyErr_SetFromErrno()}, which only
  takes an exception argument and constructs the associated value by
! inspection of the global variable \cdata{errno}.  The most
  general function is \cfunction{PyErr_SetObject()}, which takes two object
  arguments, the exception and its associated value.  You don't need to
***************
*** 232,241 ****
  nothing happened).
  
! Note that a failing \cfunction{malloc()} call must be turned into an
  exception --- the direct caller of \cfunction{malloc()} (or
  \cfunction{realloc()}) must call \cfunction{PyErr_NoMemory()} and
  return a failure indicator itself.  All the object-creating functions
! (\cfunction{PyInt_FromLong()} etc.) already do this, so only if you
! call \cfunction{malloc()} directly this note is of importance.
  
  Also note that, with the important exception of
--- 232,241 ----
  nothing happened).
  
! Every failing \cfunction{malloc()} call must be turned into an
  exception --- the direct caller of \cfunction{malloc()} (or
  \cfunction{realloc()}) must call \cfunction{PyErr_NoMemory()} and
  return a failure indicator itself.  All the object-creating functions
! (for example, \cfunction{PyInt_FromLong()}) already do this, so this
! note is only relevant to those who call \cfunction{malloc()} directly.
  
  Also note that, with the important exception of