Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libsys.tex @ 18689:064de84385ca legacy-trunk
Patch #412229: Add functions sys.getdlopenflags and sys.setdlopenflags.
Add dlopenflags to PyInterpreterState, and use it in dlopen calls.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Wed, 18 Jul 2001 16:17:16 +0000 |
| parents | 596efa7e7df8 |
| children | 07917f143488 |
line wrap: on
line diff
--- a/Doc/lib/libsys.tex Wed Jul 18 15:30:25 2001 +0000 +++ b/Doc/lib/libsys.tex Wed Jul 18 16:17:16 2001 +0000 @@ -180,6 +180,13 @@ \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 @@ \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
