mirror of
https://github.com/python/cpython.git
synced 2025-10-02 21:25:24 +00:00
gh-119311: Fix name mangling with PEP 695 generic classes (#119464)
Fixes #119311. Fixes #119395.
This commit is contained in:
parent
3e8b60905e
commit
a9a74da4a0
7 changed files with 150 additions and 14 deletions
|
@ -81,6 +81,7 @@ typedef struct _symtable_entry {
|
|||
PyObject *ste_varnames; /* list of function parameters */
|
||||
PyObject *ste_children; /* list of child blocks */
|
||||
PyObject *ste_directives;/* locations of global and nonlocal statements */
|
||||
PyObject *ste_mangled_names; /* set of names for which mangling should be applied */
|
||||
_Py_block_ty ste_type;
|
||||
int ste_nested; /* true if block is nested */
|
||||
unsigned ste_free : 1; /* true if block has free variables */
|
||||
|
@ -128,6 +129,7 @@ extern PySTEntryObject* _PySymtable_Lookup(struct symtable *, void *);
|
|||
|
||||
extern void _PySymtable_Free(struct symtable *);
|
||||
|
||||
extern PyObject *_Py_MaybeMangle(PyObject *privateobj, PySTEntryObject *ste, PyObject *name);
|
||||
extern PyObject* _Py_Mangle(PyObject *p, PyObject *name);
|
||||
|
||||
/* Flags for def-use information */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue