diff options
author | Fred Drake <fdrake@acm.org> | 2000-06-30 17:58:34 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-06-30 17:58:34 (GMT) |
commit | 1739be50cb39627c8e6deca7c395854559ba655e (patch) | |
tree | 70df983112e78fedf10622736b2a94eda0f35098 /Doc/ext/ext.tex | |
parent | 46346ec14e28c6e22ee03a24d2312ba36e6bf3b7 (diff) | |
download | cpython-1739be50cb39627c8e6deca7c395854559ba655e.zip cpython-1739be50cb39627c8e6deca7c395854559ba655e.tar.gz cpython-1739be50cb39627c8e6deca7c395854559ba655e.tar.bz2 |
Small grammatical correction from Frank Stajano. Added comment with
suggestion from Frank for an example and further explanation.
Diffstat (limited to 'Doc/ext/ext.tex')
-rw-r--r-- | Doc/ext/ext.tex | 11 |
1 files 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{} |