Skip to content

Commit a5093f6

Browse files
authored
Fix typos discovered by codespell (#100)
* Fix typos discovered by codespell * Add a space
1 parent 9e03127 commit a5093f6

File tree

11 files changed

+16
-16
lines changed

11 files changed

+16
-16
lines changed

doc/misc/design.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Design decisions
88
of automatic conversions: the various C integer types are
99
automatically wrapped and unwrapped to regular applevel integers. The
1010
type ``char`` might correspond to single-character strings instead;
11-
for integer correspondance you would use ``signed char`` or ``unsigned
11+
for integer correspondence you would use ``signed char`` or ``unsigned
1212
char``. We might also decide that ``const char *`` automatically maps
1313
to strings; for cases where you don't want that, use ``char *``.
1414

doc/source/cdef.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ Extra arguments to ``ffi.verify()``:
882882
ext = ffi.verify(..., sources=['/path/to/this/file/foo.c'])
883883

884884
except that the default name of the produced library is built from
885-
the CRC checkum of the argument ``sources``, as well as most other
885+
the CRC checksum of the argument ``sources``, as well as most other
886886
arguments you give to ``ffi.verify()`` -- but not ``relative_to``.
887887
So if you used the second line, it would stop finding the
888888
already-compiled library after your project is installed, because

doc/source/overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Create the file ``piapprox_build.py``:
5353
5454
# set_source() gives the name of the python extension module to
5555
# produce, and some C source code as a string. This C code needs
56-
# to make the declarated functions, types and globals available,
56+
# to make the declared functions, types and globals available,
5757
# so it is often just the "#include".
5858
ffibuilder.set_source("_pi_cffi",
5959
"""

doc/source/ref.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ allowed.
799799
| ``double`` | which float() works | | bool(), ``<`` |
800800
+---------------+------------------------+------------------+----------------+
801801
|``long double``| another <cdata> with | a <cdata>, to | float(), int(),|
802-
| | a ``long double``, or | avoid loosing | bool() |
802+
| | a ``long double``, or | avoid losing | bool() |
803803
| | anything on which | precision `[3]` | |
804804
| | float() works | | |
805805
+---------------+------------------------+------------------+----------------+
@@ -900,7 +900,7 @@ allowed.
900900
`[3]` ``long double`` support:
901901

902902
We keep ``long double`` values inside a cdata object to avoid
903-
loosing precision. Normal Python floating-point numbers only
903+
losing precision. Normal Python floating-point numbers only
904904
contain enough precision for a ``double``. If you really want to
905905
convert such an object to a regular Python float (i.e. a C
906906
``double``), call ``float()``. If you need to do arithmetic on
@@ -1011,7 +1011,7 @@ explicitly make using fdopen(), like this:
10111011
10121012
The special support for ``FILE *`` is anyway implemented in a similar manner
10131013
on CPython 3.x and on PyPy, because these Python implementations' files are
1014-
not natively based on ``FILE *``. Doing it explicity offers more control.
1014+
not natively based on ``FILE *``. Doing it explicitly offers more control.
10151015

10161016

10171017
.. _unichar:

src/c/_cffi_backend.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ _my_PyLong_AsLongLong(PyObject *ob)
822822
{
823823
/* (possibly) convert and cast a Python object to a long long.
824824
Like PyLong_AsLongLong(), this version accepts a Python int too, and
825-
does convertions from other types of objects. The difference is that
825+
does conversions from other types of objects. The difference is that
826826
this version refuses floats. */
827827
#if PY_MAJOR_VERSION < 3
828828
if (PyInt_Check(ob)) {
@@ -864,7 +864,7 @@ _my_PyLong_AsUnsignedLongLong(PyObject *ob, int strict)
864864
{
865865
/* (possibly) convert and cast a Python object to an unsigned long long.
866866
Like PyLong_AsLongLong(), this version accepts a Python int too, and
867-
does convertions from other types of objects. If 'strict', complains
867+
does conversions from other types of objects. If 'strict', complains
868868
with OverflowError and refuses floats. If '!strict', rounds floats
869869
and masks the result. */
870870
#if PY_MAJOR_VERSION < 3
@@ -1105,7 +1105,7 @@ convert_to_object(char *data, CTypeDescrObject *ct)
11051105
else if (ct->ct_flags & CT_ARRAY) {
11061106
if (ct->ct_length < 0) {
11071107
/* we can't return a <cdata 'int[]'> here, because we don't
1108-
know the length to give it. As a compromize, returns
1108+
know the length to give it. As a compromise, returns
11091109
<cdata 'int *'> in this case. */
11101110
ct = (CTypeDescrObject *)ct->ct_stuff;
11111111
}

src/c/libffi_arm64/include/ffi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ typedef struct {
378378

379379
/* If this is enabled, then a raw closure has the same layout
380380
as a regular closure. We use this to install an intermediate
381-
handler to do the transaltion, void** -> ffi_raw*. */
381+
handler to do the translation, void** -> ffi_raw*. */
382382

383383
void (*translate_args)(ffi_cif*,void*,void**,void*);
384384
void *this_closure;

src/c/libffi_x86_x64/ffi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
e.g. for use by gij. Routines are provided to emulate the raw API
4040
if the underlying platform doesn't allow faster implementation.
4141
42-
More details on the raw and cloure API can be found in:
42+
More details on the raw and closure API can be found in:
4343
4444
http://gcc.gnu.org/ml/java/1999-q3/msg00138.html
4545
@@ -243,7 +243,7 @@ typedef struct {
243243

244244
/* if this is enabled, then a raw closure has the same layout
245245
as a regular closure. We use this to install an intermediate
246-
handler to do the transaltion, void** -> ffi_raw*. */
246+
handler to do the translation, void** -> ffi_raw*. */
247247

248248
void (*translate_args)(ffi_cif*,void*,void**,void*);
249249
void *this_closure;

src/c/libffi_x86_x64/win32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ ffi_call_x86(void (* prepfunc)(char *, extended_cif *), /* 8 */
9090

9191
// If the return value pointer is NULL, assume no return value.
9292
/*
93-
Intel asm is weird. We have to explicitely specify 'DWORD PTR' in the nexr instruction,
93+
Intel asm is weird. We have to explicitly specify 'DWORD PTR' in the nexr instruction,
9494
otherwise only one BYTE will be compared (instead of a DWORD)!
9595
*/
9696
cmp DWORD PTR [ebp + 24], 0

src/c/minibuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/* Implementation of a C object with the 'buffer' or 'memoryview'
3-
* interface at C-level (as approriate for the version of Python we're
3+
* interface at C-level (as appropriate for the version of Python we're
44
* compiling for), but only a minimal but *consistent* part of the
55
* 'buffer' interface at application level.
66
*/

src/cffi/cparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def _workaround_for_old_pycparser(csource):
5959
# for "char***(*const)". This means we can't tell the difference
6060
# afterwards. But "char(*const(***))" gives us the right syntax
6161
# tree. The issue only occurs if there are several stars in
62-
# sequence with no parenthesis inbetween, just possibly qualifiers.
62+
# sequence with no parenthesis in between, just possibly qualifiers.
6363
# Attempt to fix it by adding some parentheses in the source: each
6464
# time we see "* const" or "* const *", we add an opening
6565
# parenthesis before each star---the hard part is figuring out where

testing/cffi1/test_new_ffi_1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1826,5 +1826,5 @@ def test_char32_t(self):
18261826
assert list(y) == [u+'\u1234', u+'\u5678', u+'\x00']
18271827
z = ffi.new("char32_t[]", u+'\U00012345')
18281828
assert len(z) == 2
1829-
assert list(z) == [u+'\U00012345', u+'\x00'] # maybe a 2-unichars strin
1829+
assert list(z) == [u+'\U00012345', u+'\x00'] # maybe a 2-unichars string
18301830
assert ffi.string(z) == u+'\U00012345'

0 commit comments

Comments
 (0)