8000 gh-107211: Rename PySymtable_Lookup() to _PySymtable_Lookup() (#107212) · python/cpython@2e07449 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e07449

Browse files
authored
gh-107211: Rename PySymtable_Lookup() to _PySymtable_Lookup() (#107212)
Rename the internal PySymtable_Lookup() function to _PySymtable_Lookup() and no longer export it.
1 parent 4bbf071 commit 2e07449

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Include/internal/pycore_symtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ extern struct symtable* _PySymtable_Build(
101101
struct _mod *mod,
102102
PyObject *filename,
103103
PyFutureFeatures *future);
104-
PyAPI_FUNC(PySTEntryObject *) PySymtable_Lookup(struct symtable *, void *);
104+
extern PySTEntryObject* _PySymtable_Lookup(struct symtable *, void *);
105105

106106
extern void _PySymtable_Free(struct symtable *);
107107

Python/compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ compiler_enter_scope(struct compiler *c, identifier name,
12801280
u->u_metadata.u_argcount = 0;
12811281
u->u_metadata.u_posonlyargcount = 0;
12821282
u->u_metadata.u_kwonlyargcount = 0;
1283-
u->u_ste = PySymtable_Lookup(c->c_st, key);
1283+
u->u_ste = _PySymtable_Lookup(c->c_st, key);
12841284
if (!u->u_ste) {
12851285
compiler_unit_free(u);
12861286
return ERROR;
@@ -5685,7 +5685,7 @@ compiler_comprehension(struct compiler *c, expr_ty e, int type,
56855685
comprehension_ty outermost;
56865686
int scope_type = c->u->u_scope_type;
56875687
int is_top_level_await = IS_TOP_LEVEL_AWAIT(c);
5688-
PySTEntryObject *entry = PySymtable_Lookup(c->c_st, (void *)e);
5688+
PySTEntryObject *entry = _PySymtable_Lookup(c->c_st, (void *)e);
56895689
if (entry == NULL) {
56905690
goto error;
56915691
}

Python/symtable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ _PySymtable_Free(struct symtable *st)
389389
}
390390

391391
PySTEntryObject *
392-
PySymtable_Lookup(struct symtable *st, void *key)
392+
_PySymtable_Lookup(struct symtable *st, void *key)
393393
{
394394
PyObject *k, *v;
395395

0 commit comments

Comments
 (0)
0