Skip to content

Commit

Permalink
Remove PyDTrace macros and functions
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Dec 7, 2022
1 parent 1fbd866 commit dee9201
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
6 changes: 5 additions & 1 deletion doc/pythoncapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def get_macros_static_inline_funcs():

regex = re.compile(fr'^static inline [^(\n]+ ({RE_IDENTIFIER}) *\(', re.MULTILINE)
funcs = set(grep(regex, files, group=1))
# FIXME: exclude 'pydtrace'?

# Remove macros only used to cast arguments types. Like:
# "static inline void Py_INCREF(...) { ...}"
Expand All @@ -107,4 +106,9 @@ def get_macros_static_inline_funcs():
if f"_{name}" in funcs:
macros.discard(name)

# Remove PyDTrace_xxx functions
for name in list(funcs):
if name.startswith("PyDTrace_"):
funcs.discard(name)

return (macros, funcs)
16 changes: 8 additions & 8 deletions doc/stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Python Limited API CPython API Internal API Total
3.9 12,265 (62%) 4,358 (22%) 3,146 (16%) 19,769
3.10 10,396 (51%) 4,616 (22%) 5,572 (27%) 20,584
3.11 9,232 (37%) 5,495 (22%) 10,046 (41%) 24,773
3.12 9,249 (31%) 5,620 (19%) 15,071 (50%) 29,940
3.12 9,287 (31%) 5,651 (19%) 15,071 (50%) 30,009
====== ============= =========== ============ ======

File Numbers
Expand Down Expand Up @@ -90,13 +90,13 @@ Functions defined as macros (only public) and static inline functions (public or
Python Macro Static inline Total
====== ========== ============= ==========
2.7 276 0 276
3.6 306 (+30) 18 (+18) 324 (+48)
3.7 315 (+9) 22 (+4) 337 (+13)
3.8 314 (-1) 31 (+9) 345 (+8)
3.9 307 (-7) 35 (+4) 342 (-3)
3.10 307 (same) 42 (+7) 349 (+7)
3.11 269 (-38) 70 (+28) 339 (-10)
3.12 246 (-23) 93 (+23) 339 (same)
3.6 306 (+30) 0 (same) 306 (+30)
3.7 315 (+9) 0 (same) 315 (+9)
3.8 314 (-1) 7 (+7) 321 (+6)
3.9 307 (-7) 11 (+4) 318 (-3)
3.10 307 (same) 18 (+7) 325 (+7)
3.11 269 (-38) 46 (+28) 315 (-10)
3.12 246 (-23) 69 (+23) 315 (same)
====== ========== ============= ==========

Structures
Expand Down

0 comments on commit dee9201

Please sign in to comment.