
On Sat, May 1, 2021 at 11:17 AM Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Start here: /Users/steve/src/Python/cpython/Doc/library/codecs.rst /Users/steve/src/Python/cpython/Doc/c-api/codec.rst
To write them in C, follow the code in Likely needed (forgot where the Unicode codecs live, try codecs.[ch] first): /Users/steve/src/Python/cpython/Python/codecs.c /Users/steve/src/Python/cpython/Include/codecs.h /Users/steve/src/Python/cpython/Objects/stringlib/codecs.h /Users/steve/src/Python/cpython/Objects/unicodectype.c /Users/steve/src/Python/cpython/Lib/codecs.py /Users/steve/src/Python/cpython/Modules/_codecsmodule.c Probably not needed: /Users/steve/src/Python/cpython/Modules/cjkcodecs /Users/steve/src/Python/cpython/Modules/clinic/_codecsmodule.c.h
I assume the "cpython" part of these paths here is your local clone of the CPython GitHub repo? (Otherwise these local filepaths from your computer don't make sense.)