Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
615b49b0
Commit
615b49b0
authored
Apr 06, 2007
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some grammar fixes
parent
9405609c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Doc/lib/libctypes.tex
Doc/lib/libctypes.tex
+5
-5
No files found.
Doc/lib/libctypes.tex
View file @
615b49b0
...
@@ -7,21 +7,21 @@
...
@@ -7,21 +7,21 @@
\versionadded
{
2.5
}
\versionadded
{
2.5
}
\code
{
ctypes
}
is a foreign function library for Python. It provides C
\code
{
ctypes
}
is a foreign function library for Python. It provides C
compatible data types, and allows
to call
functions in dlls/shared
compatible data types, and allows
calling
functions in dlls/shared
libraries. It can be used to wrap these libraries in pure Python.
libraries. It can be used to wrap these libraries in pure Python.
\subsection
{
ctypes tutorial
\label
{
ctypes-ctypes-tutorial
}}
\subsection
{
ctypes tutorial
\label
{
ctypes-ctypes-tutorial
}}
Note: The code samples in this tutorial use
s
\code
{
doctest
}
to make sure
Note: The code samples in this tutorial use
\code
{
doctest
}
to make sure
that they actually work. Since some code samples behave differently
that they actually work. Since some code samples behave differently
under Linux, Windows, or Mac OS X, they contain doctest directives in
under Linux, Windows, or Mac OS X, they contain doctest directives in
comments.
comments.
Note:
Quite some code samples
references the ctypes
\class
{
c
{
\_
}
int
}
type.
Note:
Some code sample
references the ctypes
\class
{
c
{
\_
}
int
}
type.
This type is an alias to the
\class
{
c
{
\_
}
long
}
type on 32-bit systems. So,
This type is an alias to the
\class
{
c
{
\_
}
long
}
type on 32-bit systems. So,
you should not be confused if
\class
{
c
{
\_
}
long
}
is printed if you would
you should not be confused if
\class
{
c
{
\_
}
long
}
is printed if you would
expect
\class
{
c
{
\_
}
int
}
- they are actually the same type.
expect
\class
{
c
{
\_
}
int
}
-
--
they are actually the same type.
\subsubsection
{
Loading dynamic link libraries
\label
{
ctypes-loading-dynamic-link-libraries
}}
\subsubsection
{
Loading dynamic link libraries
\label
{
ctypes-loading-dynamic-link-libraries
}}
...
@@ -38,7 +38,7 @@ return a Windows \class{HRESULT} error code. The error code is used to
...
@@ -38,7 +38,7 @@ return a Windows \class{HRESULT} error code. The error code is used to
automatically raise
\class
{
WindowsError
}
Python exceptions when the
automatically raise
\class
{
WindowsError
}
Python exceptions when the
function call fails.
function call fails.
Here are some examples for Windows
, n
ote that
\code
{
msvcrt
}
is the MS
Here are some examples for Windows
. N
ote that
\code
{
msvcrt
}
is the MS
standard C library containing most standard C functions, and uses the
standard C library containing most standard C functions, and uses the
cdecl calling convention:
cdecl calling convention:
\begin{verbatim}
\begin{verbatim}
...
...
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