The Wayback Machine - https://web.archive.org/web/20260521022950/https://github.com/python/cpython/pull/121555
Skip to content

gh-121554: remove unnecessary internal functions in compile.c#121555

Merged
iritkatriel merged 8 commits into
python:mainfrom
iritkatriel:opcode_has
Jul 10, 2024
Merged

gh-121554: remove unnecessary internal functions in compile.c#121555
iritkatriel merged 8 commits into
python:mainfrom
iritkatriel:opcode_has

Conversation

@iritkatriel
Copy link
Copy Markdown
Member

@iritkatriel iritkatriel commented Jul 9, 2024 •

Copy link
Copy Markdown
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider splitting this PR in two:

  1. the build change
  2. the C API change
Comment thread Include/internal/pycore_compile.h
Comment thread Modules/Setup.bootstrap.in
@erlend-aasland
Copy link
Copy Markdown
Contributor

I wonder if _PyImport_Inittab also needs to change now.

@iritkatriel iritkatriel requested a review from corona10 as a code owner July 9, 2024 23:05
@iritkatriel
Copy link
Copy Markdown
Member Author

I wonder if _PyImport_Inittab also needs to change now.

It has both:

  {"_opcode", PyInit__opcode},
   {"_operator", PyInit__operator},

so it seems to cover both linkage methods.

@iritkatriel
Copy link
Copy Markdown
Member Author

Consider splitting this PR in two:

  1. the build change
  2. the C API change

If we need to revert the build change then we also need to revert the code change. Might be easier in one PR.

@erlend-aasland
Copy link
Copy Markdown
Contributor

Yeah, but _opcode currently comes after the second freeze marker, FWIW.

@iritkatriel
Copy link
Copy Markdown
Member Author

Yeah, but _opcode currently comes after the second freeze marker, FWIW.

What does that mean?

@erlend-aasland
Copy link
Copy Markdown
Contributor

Yeah, but _opcode currently comes after the second freeze marker, FWIW.

What does that mean?

Ah, forget it; I was looking at a generated file. Sorry 'bout the noise.

@iritkatriel
Copy link
Copy Markdown
Member Author

@erlend-aasland Thanks for your help. Tests pass now, are you happy to approve this?

Comment thread Modules/_opcode.c Outdated
Copy link
Copy Markdown
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@iritkatriel iritkatriel merged commit 6557af6 into python:main Jul 10, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants