[Python-Dev] Split unicodeobject.c into subfiles? (original) (raw)
Andrew Svetlov andrew.svetlov at gmail.com
Thu Oct 4 22:47:00 CEST 2012
- Previous message: [Python-Dev] Split unicodeobject.c into subfiles?
- Next message: [Python-Dev] Split unicodeobject.c into subfiles?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I like the idea. From my perspective better to use subdirectory to sake of easy finding in grep style.
On Thu, Oct 4, 2012 at 11:30 PM, Victor Stinner <victor.stinner at gmail.com> wrote:
Hi,
I would like to split the huge unicodeobject.c file into smaller files. It's just the longest C file of CPython: 14,849 lines. I don't know exactly how to split it, but first I would like to know if you would agree with the idea. Example: - Objects/unicode/codecs.c - Objects/unicode/modformat.c - Objects/unicode/methods.c - Objects/unicode/operators.c - etc. I don't know if it's better to use a subdirectory, or use a prefix for new files: Objects/unicodemethods.c, Objects/unicodecodecs.c, etc. There is already a Python/codecs.c file for example (same filename). I would like to split the unicodeobject.c because it's hard to navigate in this huge file between all functions, variables, types, macros, etc. It's hard to add new code and to fix bugs. For example, the implementation of str%args takes 1000 lines, 2 types and 10 functions (since my refactor yesterday, in Python 3.3 the main function is 500 lines long :-)). I only see one argument against such refactoring: it will be harder to backport/forwardport bugfixes. Victor
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/andrew.svetlov%40gmail.com
-- Thanks, Andrew Svetlov
- Previous message: [Python-Dev] Split unicodeobject.c into subfiles?
- Next message: [Python-Dev] Split unicodeobject.c into subfiles?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]