Fix typos in faulthandler, testcapi error messages (#103020)

This commit is contained in:
Liyang Zhang 2023-03-25 16:27:02 -05:00 committed by GitHub
parent 8ec6486462
commit 11ed70b1dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -174,7 +174,7 @@ test_from_spec_invalid_metatype_inheritance(PyObject *self, PyObject *Py_UNUSED(
} }
if (res == 0) { if (res == 0) {
PyErr_SetString(PyExc_AssertionError, PyErr_SetString(PyExc_AssertionError,
"TypeError did not inlclude expected message."); "TypeError did not include expected message.");
goto finally; goto finally;
} }
result = Py_NewRef(Py_None); result = Py_NewRef(Py_None);
@ -265,7 +265,7 @@ test_type_from_ephemeral_spec(PyObject *self, PyObject *Py_UNUSED(ignored))
/* deallocate the spec (and all contents) */ /* deallocate the spec (and all contents) */
// (Explicitly ovewrite memory before freeing, // (Explicitly overwrite memory before freeing,
// so bugs show themselves even without the debug allocator's help.) // so bugs show themselves even without the debug allocator's help.)
memset(spec, 0xdd, sizeof(PyType_Spec)); memset(spec, 0xdd, sizeof(PyType_Spec));
PyMem_Del(spec); PyMem_Del(spec);

View File

@ -120,7 +120,7 @@ faulthandler_get_fileno(PyObject **file_ptr)
return -1; return -1;
if (fd < 0) { if (fd < 0) {
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"file is not a valid file descripter"); "file is not a valid file descriptor");
return -1; return -1;
} }
*file_ptr = NULL; *file_ptr = NULL;