@@ -942,7 +942,7 @@ other, and finally follow the pointer chain a few times::
942942Callback functions
943943^^^^^^^^^^^^^^^^^^
944944
945- :mod: `ctypes ` allows to create C callable function pointers from Python callables.
945+ :mod: `ctypes ` allows creating C callable function pointers from Python callables.
946946These are sometimes called *callback functions *.
947947
948948First, you must create a class for the callback function. The class knows the
@@ -1350,7 +1350,7 @@ details, consult the :manpage:`dlopen(3)` manpage, on Windows, *mode* is
13501350ignored.
13511351
13521352The *use_errno * parameter, when set to True, enables a ctypes mechanism that
1353- allows to access the system :data: `errno ` error number in a safe way.
1353+ allows accessing the system :data: `errno ` error number in a safe way.
13541354:mod: `ctypes ` maintains a thread-local copy of the systems :data: `errno `
13551355variable; if you call foreign functions created with ``use_errno=True `` then the
13561356:data: `errno ` value before the function call is swapped with the ctypes private
@@ -1421,7 +1421,7 @@ loader instance.
14211421 Class which loads shared libraries. *dlltype * should be one of the
14221422 :class: `CDLL `, :class: `PyDLL `, :class: `WinDLL `, or :class: `OleDLL ` types.
14231423
1424- :meth: `__getattr__ ` has special behavior: It allows to load a shared library by
1424+ :meth: `__getattr__ ` has special behavior: It allows loading a shared library by
14251425 accessing it as attribute of a library loader instance. The result is cached,
14261426 so repeated attribute accesses return the same library each time.
14271427
@@ -1498,7 +1498,7 @@ They are instances of a private class:
14981498
14991499 It is possible to assign a callable Python object that is not a ctypes
15001500 type, in this case the function is assumed to return a C :c:type: `int `, and
1501- the callable will be called with this integer, allowing to do further
1501+ the callable will be called with this integer, allowing further
15021502 processing or error checking. Using this is deprecated, for more flexible
15031503 post processing or error checking use a ctypes data type as
15041504 :attr: `restype ` and assign a callable to the :attr: `errcheck ` attribute.
@@ -1513,15 +1513,15 @@ They are instances of a private class:
15131513
15141514 When a foreign function is called, each actual argument is passed to the
15151515 :meth: `from_param ` class method of the items in the :attr: `argtypes `
1516- tuple, this method allows to adapt the actual argument to an object that
1516+ tuple, this method allows adapting the actual argument to an object that
15171517 the foreign function accepts. For example, a :class: `c_char_p ` item in
15181518 the :attr: `argtypes ` tuple will convert a string passed as argument into
15191519 a bytes object using ctypes conversion rules.
15201520
15211521 New: It is now possible to put items in argtypes which are not ctypes
15221522 types, but each item must have a :meth: `from_param ` method which returns a
15231523 value usable as argument (integer, string, ctypes instance). This allows
1524- to define adapters that can adapt custom objects as function parameters.
1524+ defining adapters that can adapt custom objects as function parameters.
15251525
15261526 .. attribute :: errcheck
15271527
@@ -1535,12 +1535,12 @@ They are instances of a private class:
15351535 *result * is what the foreign function returns, as specified by the
15361536 :attr: `restype ` attribute.
15371537
1538- *func * is the foreign function object itself, this allows to reuse the
1538+ *func * is the foreign function object itself, this allows reusing the
15391539 same callable object to check or post process the results of several
15401540 functions.
15411541
15421542 *arguments * is a tuple containing the parameters originally passed to
1543- the function call, this allows to specialize the behavior on the
1543+ the function call, this allows specializing the behavior on the
15441544 arguments used.
15451545
15461546 The object that this function returns will be returned from the
@@ -1785,7 +1785,7 @@ Utility functions
17851785 If a bytes object is specified as first argument, the buffer is made one item
17861786 larger than its length so that the last element in the array is a NUL
17871787 termination character. An integer can be passed as second argument which allows
1788- to specify the size of the array if the length of the bytes should not be used.
1788+ specifying the size of the array if the length of the bytes should not be used.
17891789
17901790
17911791
@@ -1800,21 +1800,21 @@ Utility functions
18001800 If a string is specified as first argument, the buffer is made one item
18011801 larger than the length of the string so that the last element in the array is a
18021802 NUL termination character. An integer can be passed as second argument which
1803- allows to specify the size of the array if the length of the string should not
1803+ allows specifying the size of the array if the length of the string should not
18041804 be used.
18051805
18061806
18071807
18081808.. function :: DllCanUnloadNow()
18091809
1810- Windows only: This function is a hook which allows to implement in-process
1810+ Windows only: This function is a hook which allows implementing in-process
18111811 COM servers with ctypes. It is called from the DllCanUnloadNow function that
18121812 the _ctypes extension dll exports.
18131813
18141814
18151815.. function :: DllGetClassObject()
18161816
1817- Windows only: This function is a hook which allows to implement in-process
1817+ Windows only: This function is a hook which allows implementing in-process
18181818 COM servers with ctypes. It is called from the DllGetClassObject function
18191819 that the ``_ctypes `` extension dll exports.
18201820
@@ -2321,7 +2321,7 @@ other data types containing pointer type fields.
23212321 checked, only one field can be accessed when names are repeated.
23222322
23232323 It is possible to define the :attr: `_fields_ ` class variable *after * the
2324- class statement that defines the Structure subclass, this allows to create
2324+ class statement that defines the Structure subclass, this allows creating
23252325 data types that directly or indirectly reference themselves::
23262326
23272327 class List(Structure):
@@ -2342,7 +2342,7 @@ other data types containing pointer type fields.
23422342
23432343 .. attribute :: _pack_
23442344
2345- An optional small integer that allows to override the alignment of
2345+ An optional small integer that allows overriding the alignment of
23462346 structure fields in the instance. :attr: `_pack_ ` must already be defined
23472347 when :attr: `_fields_ ` is assigned, otherwise it will have no effect.
23482348
@@ -2354,8 +2354,8 @@ other data types containing pointer type fields.
23542354 assigned, otherwise it will have no effect.
23552355
23562356 The fields listed in this variable must be structure or union type fields.
2357- :mod: `ctypes ` will create descriptors in the structure type that allows to
2358- access the nested fields directly, without the need to create the
2357+ :mod: `ctypes ` will create descriptors in the structure type that allows
2358+ accessing the nested fields directly, without the need to create the
23592359 structure or union field.
23602360
23612361 Here is an example type (Windows)::
0 commit comments