Skip to content

Commit

Permalink
pythongh-107603: AC only includes pycore_gc.h if needed
Browse files Browse the repository at this point in the history
Argument Clinic now only includes pycore_gc.h if PyGC_Head is needed,
and only includes pycore_runtime.h if _Py_ID() is needed.

Add Py_ARGUMENT_CLINIC_AVOID_INTERNAL_CAPI macro to opt-out for the
internal C API in Argument Clinic.

The following extensions avoids the internal C API by defining the
macro Py_ARGUMENT_CLINIC_AVOID_INTERNAL_CAPI:

* Modules/_csv.c
* Modules/_multiprocessing/posixshmem.c
* Modules/_testcapi/exceptions.c
* Modules/grpmodule.c
* Modules/syslogmodule.c
  • Loading branch information
vstinner committed Aug 31, 2023
1 parent 79823c1 commit e8ea3f9
Show file tree
Hide file tree
Showing 140 changed files with 400 additions and 3,768 deletions.
4 changes: 0 additions & 4 deletions Include/internal/pycore_global_objects_fini_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Include/internal/pycore_global_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ struct _Py_global_strings {
STRUCT_FOR_ID(extend)
STRUCT_FOR_ID(extra_tokens)
STRUCT_FOR_ID(f)
STRUCT_FOR_ID(facility)
STRUCT_FOR_ID(factory)
STRUCT_FOR_ID(false)
STRUCT_FOR_ID(family)
Expand Down Expand Up @@ -465,7 +464,6 @@ struct _Py_global_strings {
STRUCT_FOR_ID(hi)
STRUCT_FOR_ID(hook)
STRUCT_FOR_ID(id)
STRUCT_FOR_ID(ident)
STRUCT_FOR_ID(ignore)
STRUCT_FOR_ID(imag)
STRUCT_FOR_ID(importlib)
Expand Down Expand Up @@ -528,7 +526,6 @@ struct _Py_global_strings {
STRUCT_FOR_ID(lo)
STRUCT_FOR_ID(locale)
STRUCT_FOR_ID(locals)
STRUCT_FOR_ID(logoption)
STRUCT_FOR_ID(loop)
STRUCT_FOR_ID(mapping)
STRUCT_FOR_ID(match)
Expand Down Expand Up @@ -564,7 +561,6 @@ struct _Py_global_strings {
STRUCT_FOR_ID(narg)
STRUCT_FOR_ID(ndigits)
STRUCT_FOR_ID(new_file_name)
STRUCT_FOR_ID(new_limit)
STRUCT_FOR_ID(newline)
STRUCT_FOR_ID(newlines)
STRUCT_FOR_ID(next)
Expand Down
4 changes: 0 additions & 4 deletions Include/internal/pycore_runtime_init_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions Include/internal/pycore_unicodeobject_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8ea3f9

Please sign in to comment.