From 1739be50cb39627c8e6deca7c395854559ba655e Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 30 Jun 2000 17:58:34 +0000 Subject: Small grammatical correction from Frank Stajano. Added comment with suggestion from Frank for an example and further explanation. --- Doc/ext/ext.tex | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Doc/ext/ext.tex b/Doc/ext/ext.tex index 4171da9..83f4681 100644 --- a/Doc/ext/ext.tex +++ b/Doc/ext/ext.tex @@ -1398,7 +1398,8 @@ references generally return \NULL{} only to indicate that an exception occurred. The reason for not testing for \NULL{} arguments is that functions often pass the objects they receive on to other function --- if each function were to test for \NULL{}, -there would be a lot of redundant tests and the code would run slower. +there would be a lot of redundant tests and the code would run more +slowly. It is better to test for \NULL{} only at the ``source'', i.e.\ when a pointer that may be \NULL{} is received, e.g.\ from @@ -1422,7 +1423,13 @@ These guarantees don't hold when you use the ``old'' style calling convention --- this is still found in much existing code.} It is a severe error to ever let a \NULL{} pointer ``escape'' to -the Python user. +the Python user. + +% Frank Stajano: +% A pedagogically buggy example, along the lines of the previous listing, +% would be helpful here -- showing in more concrete terms what sort of +% actions could cause the problem. I can't very well imagine it from the +% description. \section{Writing Extensions in \Cpp{} -- cgit v0.12