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
81567d2b
Kaydet (Commit)
81567d2b
authored
Haz 11, 2008
tarafından
Thomas Heller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Markup fixes, spelling corrections, and better wordings. Hopefully.
üst
d987545d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
ctypes.rst
Doc/library/ctypes.rst
+8
-9
No files found.
Doc/library/ctypes.rst
Dosyayı görüntüle @
81567d2b
...
...
@@ -42,7 +42,7 @@ loads libraries which export functions using the standard ``cdecl`` calling
convention, while *windll* libraries call functions using the ``stdcall``
calling convention. *oledll* also uses the ``stdcall`` calling convention, and
assumes the functions return a Windows :class:`HRESULT` error code. The error
code is used to automatically raise
:class:`WindowsError` Python exceptions
when
code is used to automatically raise
a :class:`WindowsError` exception
when
the function call fails.
Here are some examples for Windows. Note that ``msvcrt`` is the MS standard C
...
...
@@ -57,10 +57,10 @@ convention::
>>> libc = cdll.msvcrt # doctest: +WINDOWS
>>>
Windows appends the usual
'.dll'
file suffix automatically.
Windows appends the usual
``.dll``
file suffix automatically.
On Linux, it is required to specify the filename *including* the extension to
load a library, so attribute access
does not work
. Either the
load a library, so attribute access
can not be used to load libraries
. Either the
:meth:`LoadLibrary` method of the dll loaders should be used, or you should load
the library by creating an instance of CDLL by calling the constructor::
...
...
@@ -109,7 +109,7 @@ UNICODE is defined or not::
*windll* does not try to select one of them by magic, you must access the
version you need by specifying ``GetModuleHandleA`` or ``GetModuleHandleW``
explicitly, and then call it with
normal
strings or unicode strings
explicitly, and then call it with strings or unicode strings
respectively.
Sometimes, dlls export functions with names which aren't valid Python
...
...
@@ -424,9 +424,9 @@ to implement a :meth:`from_param` class method for them to be able to use them
in the :attr:`argtypes` sequence. The :meth:`from_param` class method receives
the Python object passed to the function call, it should do a typecheck or
whatever is needed to make sure this object is acceptable, and then return the
object itself, it
'
s :attr:`_as_parameter_` attribute, or whatever you want to
object itself, its :attr:`_as_parameter_` attribute, or whatever you want to
pass as the C function argument in this case. Again, the result should be an
integer, string, unicode, a ``ctypes`` instance, or
something having the
integer, string, unicode, a ``ctypes`` instance, or
an object with an
:attr:`_as_parameter_` attribute.
...
...
@@ -1617,9 +1617,8 @@ type and the argument types of the function.
`use_last_error` does the same for the Windows error code.
.. versionchanged:: 2.6
The optional `use_errno` and `use_last_error` parameters were added
in Python 2.6.
The optional `use_errno` and `use_last_error` parameters were
added.
.. function:: WINFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False)
...
...
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