summaryrefslogtreecommitdiff
path: root/Doc/lib/libsys.tex
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-07-18 16:17:16 +0000
committerMartin v. Löwis <martin@v.loewis.de>2001-07-18 16:17:16 +0000
commit8844f8cf00b503f45dcd28086515d540bb861ac0 (patch)
treeea20a73bce37559d4e24b3af1d4cbee2e42d384a /Doc/lib/libsys.tex
parentf4cf190623bf4e1b4a81a3ab05c395bca82d9b29 (diff)
downloadcpython-8844f8cf00b503f45dcd28086515d540bb861ac0.tar.gz
Patch #412229: Add functions sys.getdlopenflags and sys.setdlopenflags.
Add dlopenflags to PyInterpreterState, and use it in dlopen calls.
Diffstat (limited to 'Doc/lib/libsys.tex')
-rw-r--r--Doc/lib/libsys.tex21
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex
index be5a599a45..4818cfde36 100644
--- a/Doc/lib/libsys.tex
+++ b/Doc/lib/libsys.tex
@@ -180,6 +180,13 @@ way to exit a program when an error occurs.
\versionadded{2.0}
\end{funcdesc}
+\begin{funcdesc}{getdlopenflags}{}
+ Return the current value of the flags that are used for \code{dlopen}
+ calls. The flag constants are defined in the \refmodule{dl} and
+ \module{DLFCN} modules.
+ \versionadded{2.2}
+\end{funcdesc}
+
\begin{funcdesc}{getrefcount}{object}
Return the reference count of the \var{object}. The count returned is
generally one higher than you might expect, because it includes the
@@ -333,6 +340,20 @@ maximizing responsiveness as well as overhead.
\versionadded{2.0}
\end{funcdesc}
+\begin{funcdesc}{sertdlopenflags}{n}
+ Set the flags that will be used for \code{dlopen()} calls, i.e. when
+ the interpreter loads extension modules. Among other things, this
+ will enable a lazy resolving of symbols when imporing a module, if
+ called as \code{sys.setdlopenflags(0)}. To share symols across
+ extension modules, call as
+ \code{sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)}. The symbolic
+ names for the flag modules can be either found in the \refmodule{dl}
+ module, or in the \module{DLFCN} module. If \module{DLFCN} is not
+ available, it can be generated from \code{/usr/include/dlfcn.h} using
+ the \code{h2py} script.
+ \versionadded{2.2}
+\end{funcdesc}
+
\begin{funcdesc}{setprofile}{profilefunc}
Set the system's profile function, which allows you to implement a
Python source code profiler in Python. See the chapter on the