mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
Fix typos in the Modules directory (GH-28761)
This commit is contained in:
parent
5baec4aea6
commit
dd02a696e5
19 changed files with 21 additions and 21 deletions
|
@ -489,7 +489,7 @@ err:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Since dialect is now a heap type, it inherits pickling method for
|
/* Since dialect is now a heap type, it inherits pickling method for
|
||||||
* protocol 0 and 1 from object, therefore it needs to be overriden */
|
* protocol 0 and 1 from object, therefore it needs to be overridden */
|
||||||
|
|
||||||
PyDoc_STRVAR(dialect_reduce_doc, "raises an exception to avoid pickling");
|
PyDoc_STRVAR(dialect_reduce_doc, "raises an exception to avoid pickling");
|
||||||
|
|
||||||
|
|
|
@ -834,7 +834,7 @@ static int _call_function_pointer(int flags,
|
||||||
# define HAVE_FFI_PREP_CIF_VAR_RUNTIME false
|
# define HAVE_FFI_PREP_CIF_VAR_RUNTIME false
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* Even on Apple-arm64 the calling convention for variadic functions conincides
|
/* Even on Apple-arm64 the calling convention for variadic functions coincides
|
||||||
* with the standard calling convention in the case that the function called
|
* with the standard calling convention in the case that the function called
|
||||||
* only with its fixed arguments. Thus, we do not need a special flag to be
|
* only with its fixed arguments. Thus, we do not need a special flag to be
|
||||||
* set on variadic functions. We treat a function as variadic if it is called
|
* set on variadic functions. We treat a function as variadic if it is called
|
||||||
|
|
|
@ -35,7 +35,7 @@ PyCField_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
* Expects the size, index and offset for the current field in *psize and
|
* Expects the size, index and offset for the current field in *psize and
|
||||||
* *poffset, stores the total size so far in *psize, the offset for the next
|
* *poffset, stores the total size so far in *psize, the offset for the next
|
||||||
* field in *poffset, the alignment requirements for the current field in
|
* field in *poffset, the alignment requirements for the current field in
|
||||||
* *palign, and returns a field desriptor for this field.
|
* *palign, and returns a field descriptor for this field.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* bitfields extension:
|
* bitfields extension:
|
||||||
|
|
|
@ -208,7 +208,7 @@ typedef struct {
|
||||||
PyObject *checker;
|
PyObject *checker;
|
||||||
int flags; /* calling convention and such */
|
int flags; /* calling convention and such */
|
||||||
|
|
||||||
/* pep3118 fields, pointers neeed PyMem_Free */
|
/* pep3118 fields, pointers need PyMem_Free */
|
||||||
char *format;
|
char *format;
|
||||||
int ndim;
|
int ndim;
|
||||||
Py_ssize_t *shape;
|
Py_ssize_t *shape;
|
||||||
|
|
|
@ -4527,7 +4527,7 @@ dump(PicklerObject *self, PyObject *obj)
|
||||||
* call when setting the reducer_override attribute of the Pickler instance
|
* call when setting the reducer_override attribute of the Pickler instance
|
||||||
* to a bound method of the same instance. This is important as the Pickler
|
* to a bound method of the same instance. This is important as the Pickler
|
||||||
* instance holds a reference to each object it has pickled (through its
|
* instance holds a reference to each object it has pickled (through its
|
||||||
* memo): thus, these objects wont be garbage-collected as long as the
|
* memo): thus, these objects won't be garbage-collected as long as the
|
||||||
* Pickler itself is not collected. */
|
* Pickler itself is not collected. */
|
||||||
Py_CLEAR(self->reducer_override);
|
Py_CLEAR(self->reducer_override);
|
||||||
return status;
|
return status;
|
||||||
|
@ -6540,7 +6540,7 @@ do_setitems(UnpicklerObject *self, Py_ssize_t x)
|
||||||
return 0;
|
return 0;
|
||||||
if ((len - x) % 2 != 0) {
|
if ((len - x) % 2 != 0) {
|
||||||
PickleState *st = _Pickle_GetGlobalState();
|
PickleState *st = _Pickle_GetGlobalState();
|
||||||
/* Currupt or hostile pickle -- we never write one like this. */
|
/* Corrupt or hostile pickle -- we never write one like this. */
|
||||||
PyErr_SetString(st->UnpicklingError,
|
PyErr_SetString(st->UnpicklingError,
|
||||||
"odd number of items for SETITEMS");
|
"odd number of items for SETITEMS");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* 2001-05-14 fl fixes for 1.5.2 compatibility
|
* 2001-05-14 fl fixes for 1.5.2 compatibility
|
||||||
* 2001-07-01 fl added BIGCHARSET support (from Martin von Loewis)
|
* 2001-07-01 fl added BIGCHARSET support (from Martin von Loewis)
|
||||||
* 2001-10-18 fl fixed group reset issue (from Matthew Mueller)
|
* 2001-10-18 fl fixed group reset issue (from Matthew Mueller)
|
||||||
* 2001-10-20 fl added split primitive; reenable unicode for 1.6/2.0/2.1
|
* 2001-10-20 fl added split primitive; re-enable unicode for 1.6/2.0/2.1
|
||||||
* 2001-10-21 fl added sub/subn primitive
|
* 2001-10-21 fl added sub/subn primitive
|
||||||
* 2001-10-24 fl added finditer primitive (for 2.2 only)
|
* 2001-10-24 fl added finditer primitive (for 2.2 only)
|
||||||
* 2001-12-07 fl fixed memory leak in sub/subn (Guido van Rossum)
|
* 2001-12-07 fl fixed memory leak in sub/subn (Guido van Rossum)
|
||||||
|
|
|
@ -5323,7 +5323,7 @@ encode_locale_ex(PyObject *self, PyObject *args)
|
||||||
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
|
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PyErr_SetString(PyExc_ValueError, "unknow error code");
|
PyErr_SetString(PyExc_ValueError, "unknown error code");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@ -5366,7 +5366,7 @@ decode_locale_ex(PyObject *self, PyObject *args)
|
||||||
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
|
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PyErr_SetString(PyExc_ValueError, "unknow error code");
|
PyErr_SetString(PyExc_ValueError, "unknown error code");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -1219,7 +1219,7 @@ where the corresponding signal handler will be executed.\n\
|
||||||
If *signum* is omitted, SIGINT is assumed.\n\
|
If *signum* is omitted, SIGINT is assumed.\n\
|
||||||
A subthread can use this function to interrupt the main thread.\n\
|
A subthread can use this function to interrupt the main thread.\n\
|
||||||
\n\
|
\n\
|
||||||
Note: the default signal hander for SIGINT raises ``KeyboardInterrupt``."
|
Note: the default signal handler for SIGINT raises ``KeyboardInterrupt``."
|
||||||
);
|
);
|
||||||
|
|
||||||
static lockobject *newlockobject(PyObject *module);
|
static lockobject *newlockobject(PyObject *module);
|
||||||
|
|
|
@ -797,7 +797,7 @@ PyTclObject_str(PyTclObject *self)
|
||||||
Py_INCREF(self->string);
|
Py_INCREF(self->string);
|
||||||
return self->string;
|
return self->string;
|
||||||
}
|
}
|
||||||
/* XXX Could chache result if it is non-ASCII. */
|
/* XXX Could cache result if it is non-ASCII. */
|
||||||
return unicodeFromTclObj(self->value);
|
return unicodeFromTclObj(self->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -833,7 +833,7 @@ tracemalloc_clear_filename(void *value)
|
||||||
static void
|
static void
|
||||||
tracemalloc_clear_traces(void)
|
tracemalloc_clear_traces(void)
|
||||||
{
|
{
|
||||||
/* The GIL protects variables againt concurrent access */
|
/* The GIL protects variables against concurrent access */
|
||||||
assert(PyGILState_Check());
|
assert(PyGILState_Check());
|
||||||
|
|
||||||
TABLES_LOCK();
|
TABLES_LOCK();
|
||||||
|
|
|
@ -1342,7 +1342,7 @@ tzrule_transitions(_tzrule *rule, int year, int64_t *start, int64_t *end)
|
||||||
* could technically be calculated from the timestamp, but given that the
|
* could technically be calculated from the timestamp, but given that the
|
||||||
* callers of this function already have the year information accessible from
|
* callers of this function already have the year information accessible from
|
||||||
* the datetime struct, it is taken as an additional parameter to reduce
|
* the datetime struct, it is taken as an additional parameter to reduce
|
||||||
* unncessary calculation.
|
* unnecessary calculation.
|
||||||
* */
|
* */
|
||||||
static _ttinfo *
|
static _ttinfo *
|
||||||
find_tzrule_ttinfo(_tzrule *rule, int64_t ts, unsigned char fold, int year)
|
find_tzrule_ttinfo(_tzrule *rule, int64_t ts, unsigned char fold, int year)
|
||||||
|
|
|
@ -3976,7 +3976,7 @@ initializeEncoding(XML_Parser parser) {
|
||||||
const char *s;
|
const char *s;
|
||||||
#ifdef XML_UNICODE
|
#ifdef XML_UNICODE
|
||||||
char encodingBuf[128];
|
char encodingBuf[128];
|
||||||
/* See comments abount `protoclEncodingName` in parserInit() */
|
/* See comments about `protoclEncodingName` in parserInit() */
|
||||||
if (! parser->m_protocolEncodingName)
|
if (! parser->m_protocolEncodingName)
|
||||||
s = NULL;
|
s = NULL;
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -50,7 +50,7 @@ CT while gc is running.
|
||||||
https://www.python.org/sf/1055820
|
https://www.python.org/sf/1055820
|
||||||
|
|
||||||
shows how innocent it can be, and also how nasty. Variants of the three
|
shows how innocent it can be, and also how nasty. Variants of the three
|
||||||
focussed test cases attached to that bug report are now part of Python's
|
focused test cases attached to that bug report are now part of Python's
|
||||||
standard Lib/test/test_gc.py.
|
standard Lib/test/test_gc.py.
|
||||||
|
|
||||||
Jim Fulton gave the best nutshell summary of the new (in 2.4 and 2.3.5)
|
Jim Fulton gave the best nutshell summary of the new (in 2.4 and 2.3.5)
|
||||||
|
|
|
@ -1457,7 +1457,7 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If a pyvenv.cfg configure file is found,
|
/* If a pyvenv.cfg configure file is found,
|
||||||
argv0_path is overriden with its 'home' variable. */
|
argv0_path is overridden with its 'home' variable. */
|
||||||
status = calculate_read_pyenv(calculate);
|
status = calculate_read_pyenv(calculate);
|
||||||
if (_PyStatus_EXCEPTION(status)) {
|
if (_PyStatus_EXCEPTION(status)) {
|
||||||
return status;
|
return status;
|
||||||
|
|
|
@ -269,7 +269,7 @@ sha1_done(struct sha1_state *sha1, unsigned char *out)
|
||||||
sha1->curlen = 0;
|
sha1->curlen = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pad upto 56 bytes of zeroes */
|
/* pad up to 56 bytes of zeroes */
|
||||||
while (sha1->curlen < 56) {
|
while (sha1->curlen < 56) {
|
||||||
sha1->buf[sha1->curlen++] = (unsigned char)0;
|
sha1->buf[sha1->curlen++] = (unsigned char)0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1595,7 +1595,7 @@ signal_get_set_handlers(signal_state_t *state, PyObject *mod_dict)
|
||||||
Py_XDECREF(old_func);
|
Py_XDECREF(old_func);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instal Python SIGINT handler which raises KeyboardInterrupt
|
// Install Python SIGINT handler which raises KeyboardInterrupt
|
||||||
PyObject* sigint_func = get_handler(SIGINT);
|
PyObject* sigint_func = get_handler(SIGINT);
|
||||||
if (sigint_func == state->default_handler) {
|
if (sigint_func == state->default_handler) {
|
||||||
PyObject *int_handler = PyMapping_GetItemString(mod_dict,
|
PyObject *int_handler = PyMapping_GetItemString(mod_dict,
|
||||||
|
|
|
@ -929,7 +929,7 @@ sock_call_ex(PySocketSockObject *s,
|
||||||
reading, but the data then discarded by the OS because of a
|
reading, but the data then discarded by the OS because of a
|
||||||
wrong checksum.
|
wrong checksum.
|
||||||
|
|
||||||
Loop on select() to recheck for socket readyness. */
|
Loop on select() to recheck for socket readiness. */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ syslog_syslog(PyObject * self, PyObject * args)
|
||||||
PyObject *openargs;
|
PyObject *openargs;
|
||||||
|
|
||||||
/* Continue even if PyTuple_New fails, because openlog(3) is optional.
|
/* Continue even if PyTuple_New fails, because openlog(3) is optional.
|
||||||
* So, we can still do loggin in the unlikely event things are so hosed
|
* So, we can still do logging in the unlikely event things are so hosed
|
||||||
* that we can't do this tuple.
|
* that we can't do this tuple.
|
||||||
*/
|
*/
|
||||||
if ((openargs = PyTuple_New(0))) {
|
if ((openargs = PyTuple_New(0))) {
|
||||||
|
|
|
@ -82,7 +82,7 @@ typedef struct {
|
||||||
Bytef *next_posi;
|
Bytef *next_posi;
|
||||||
} _Uint32Window;
|
} _Uint32Window;
|
||||||
|
|
||||||
/* Initialize the buffer with an inital buffer size.
|
/* Initialize the buffer with an initial buffer size.
|
||||||
|
|
||||||
On success, return value >= 0
|
On success, return value >= 0
|
||||||
On failure, return value < 0 */
|
On failure, return value < 0 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue