Skip to content

Commit

Permalink
Update comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Aug 27, 2024
1 parent 2887d81 commit 4f807f5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -8511,9 +8511,11 @@ encoding_map_lookup(Py_UCS4 c, PyObject *mapping)
return i;
}

/* Lookup the character ch in the mapping. If the character
can't be found, Py_None is returned (or NULL, if another
error occurred). */
/* Lookup the character in the mapping.
On success, return PyLong, PyBytes or None (if the character can't be found).
If the result is PyLong, put its value in replace.
On error, return NULL.
*/
static PyObject *
charmapencode_lookup(Py_UCS4 c, PyObject *mapping, unsigned char *replace)
{
Expand Down Expand Up @@ -8944,6 +8946,8 @@ unicode_translate_call_errorhandler(const char *errors,

/* Lookup the character ch in the mapping and put the result in result,
which must be decrefed by the caller.
The result can be PyLong, PyUnicode, None or NULL.
If the result is PyLong, put its value in replace.
Return 0 on success, -1 on error */
static int
charmaptranslate_lookup(Py_UCS4 c, PyObject *mapping, PyObject **result, Py_UCS4 *replace)
Expand Down

0 comments on commit 4f807f5

Please sign in to comment.