Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
76c5af62
Kaydet (Commit)
76c5af62
authored
Tem 12, 2006
tarafından
Thomas Heller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix the wrong description of LibraryLoader.LoadLibrary, and document
the DEFAULT_MODE constant.
üst
47d7a069
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
libctypes.tex
Doc/lib/libctypes.tex
+12
-7
No files found.
Doc/lib/libctypes.tex
Dosyayı görüntüle @
76c5af62
...
...
@@ -1474,13 +1474,13 @@ locate the library at runtime.
There are several ways to loaded shared libraries into the Python
process. One way is to instantiate one of the following classes:
\begin{classdesc}
{
CDLL
}{
name, mode=
RTLD
_
LOCAL
, handle=None
}
\begin{classdesc}
{
CDLL
}{
name, mode=
DEFAULT
_
MODE
, handle=None
}
Instances of this class represent loaded shared libraries.
Functions in these libraries use the standard C calling
convention, and are assumed to return
\code
{
int
}
.
\end{classdesc}
\begin{classdesc}
{
OleDLL
}{
name, mode=
RTLD
_
LOCAL
, handle=None
}
\begin{classdesc}
{
OleDLL
}{
name, mode=
DEFAULT
_
MODE
, handle=None
}
Windows only: Instances of this class represent loaded shared
libraries, functions in these libraries use the
\code
{
stdcall
}
calling convention, and are assumed to return the windows specific
...
...
@@ -1490,7 +1490,7 @@ with additional error code. If the return value signals a
failure, an
\class
{
WindowsError
}
is automatically raised.
\end{classdesc}
\begin{classdesc}
{
WinDLL
}{
name, mode=
RTLD
_
LOCAL
, handle=None
}
\begin{classdesc}
{
WinDLL
}{
name, mode=
DEFAULT
_
MODE
, handle=None
}
Windows only: Instances of this class represent loaded shared
libraries, functions in these libraries use the
\code
{
stdcall
}
calling convention, and are assumed to return
\code
{
int
}
by default.
...
...
@@ -1503,7 +1503,7 @@ convention on this platform.
The Python GIL is released before calling any function exported by
these libraries, and reaquired afterwards.
\begin{classdesc}
{
PyDLL
}{
name, mode=
RTLD
_
LOCAL
, handle=None
}
\begin{classdesc}
{
PyDLL
}{
name, mode=
DEFAULT
_
MODE
, handle=None
}
Instances of this class behave like
\class
{
CDLL
}
instances, except
that the Python GIL is
\emph
{
not
}
released during the function call,
and after the function execution the Python error flag is checked.
...
...
@@ -1533,6 +1533,12 @@ Flag to use as \var{mode} parameter. On platforms where this is not
available, it is the same as
\var
{
RTLD
{
\_
}
GLOBAL
}
.
\end{datadescni}
\begin{datadescni}
{
DEFAULT
_
MODE
}
The default mode which is used to load shared libraries. On OSX
10.3, this is
\var
{
RTLD
{
\_
}
GLOBAL
}
, otherwise it is the same as
\var
{
RTLD
{
\_
}
LOCAL
}
.
\end{datadescni}
Instances of these classes have no public methods, however
\method
{{
\_
}{
\_
}
getattr
{
\_
}{
\_
}}
and
\method
{{
\_
}{
\_
}
getitem
{
\_
}{
\_
}}
have special behaviour: functions
exported by the shared library can be accessed as attributes of by
...
...
@@ -1566,10 +1572,9 @@ instance. The result is cached, so repeated attribute accesses
return the same library each time.
\end{classdesc}
\begin{methoddesc}
{
LoadLibrary
}{
name
, mode=RTLD
_
LOCAL, handle=None
}
\begin{methoddesc}
{
LoadLibrary
}{
name
}
Load a shared library into the process and return it. This method
always creates a new instance of the library. All three
parameters are passed to the constructor of the library object.
always returns a new instance of the library.
\end{methoddesc}
These prefabricated library loaders are available:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment