Show More
@@ -52,6 +52,14 b' static int _addpath(PyObject *dirs, PyOb' | |||||
52 | PyObject *key = NULL; |
|
52 | PyObject *key = NULL; | |
53 | int ret = -1; |
|
53 | int ret = -1; | |
54 |
|
54 | |||
|
55 | /* This loop is super critical for performance. That's why we inline | |||
|
56 | * access to Python structs instead of going through a supported API. | |||
|
57 | * The implementation, therefore, is heavily dependent on CPython | |||
|
58 | * implementation details. We also commit violations of the Python | |||
|
59 | * "protocol" such as mutating immutable objects. But since we only | |||
|
60 | * mutate objects created in this function or in other well-defined | |||
|
61 | * locations, the references are known so these violations should go | |||
|
62 | * unnoticed. */ | |||
55 | while ((pos = _finddir(cpath, pos - 1)) != -1) { |
|
63 | while ((pos = _finddir(cpath, pos - 1)) != -1) { | |
56 | PyObject *val; |
|
64 | PyObject *val; | |
57 |
|
65 |
General Comments 0
You need to be logged in to leave comments.
Login now