diff options
author | Fred Drake <fdrake@acm.org> | 2000-10-02 22:38:09 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-10-02 22:38:09 (GMT) |
commit | 4dc1a6d6bae5c5828ca1e3473be280650dfadab5 (patch) | |
tree | 65a374648204b775c7fb0abee3f04f09b0f09986 /Doc/ext | |
parent | 296b8f5bd25bc579bcf5e3bb93ef9e917a9e7895 (diff) | |
download | cpython-4dc1a6d6bae5c5828ca1e3473be280650dfadab5.zip cpython-4dc1a6d6bae5c5828ca1e3473be280650dfadab5.tar.gz cpython-4dc1a6d6bae5c5828ca1e3473be280650dfadab5.tar.bz2 |
Added some comments on the interaction of reload() and extension modules.
Based on comments from Chris Barker <cbarker@jps.net>.
Diffstat (limited to 'Doc/ext')
-rw-r--r-- | Doc/ext/ext.tex | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/ext/ext.tex b/Doc/ext/ext.tex index ae1b543..c29062c 100644 --- a/Doc/ext/ext.tex +++ b/Doc/ext/ext.tex @@ -435,7 +435,7 @@ int main(int argc, char **argv) initspam(); \end{verbatim} -And example may be found in the file \file{Demo/embed/demo.c} in the +An example may be found in the file \file{Demo/embed/demo.c} in the Python source distribution. \strong{Note:} Removing entries from \code{sys.modules} or importing @@ -444,6 +444,11 @@ following a \cfunction{fork()} without an intervening \cfunction{exec()}) can create problems for some extension modules. Extension module authors should exercise caution when initializing internal data structures. +Note also that the \function{reload()} function can be used with +extension modules, and will call the module initialization function +(\cfunction{initspam()} in the example), but will not load the module +again if it was loaded from a dynamically loadable object file +(\file{.so} on \UNIX, \file{.dll} on Windows). A more substantial example module is included in the Python source distribution as \file{Modules/xxmodule.c}. This file may be used as a |