diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-08-16 23:29:40 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-08-16 23:29:40 (GMT) |
commit | e0d12eb85cff367497090b1fdc58582edc0d4c99 (patch) | |
tree | c040375a7a86293ced55900456710b1873b614ca | |
parent | 765812f1ffc7c78916fc95e289dc52a218582620 (diff) | |
download | cpython-e0d12eb85cff367497090b1fdc58582edc0d4c99.zip cpython-e0d12eb85cff367497090b1fdc58582edc0d4c99.tar.gz cpython-e0d12eb85cff367497090b1fdc58582edc0d4c99.tar.bz2 |
PySTEntry's constructor is static; there's no point in a fancy API name
-rw-r--r-- | Python/symtable.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index 2f0b889..5e67c06 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -16,9 +16,9 @@ #define RETURN_VAL_IN_GENERATOR \ "'return' with argument inside generator" -/* XXX(nnorwitz): change name since static? */ + static PySTEntryObject * -PySTEntry_New(struct symtable *st, identifier name, _Py_block_ty block, +ste_new(struct symtable *st, identifier name, _Py_block_ty block, void *key, int lineno) { PySTEntryObject *ste = NULL; @@ -722,7 +722,7 @@ symtable_warn(struct symtable *st, char *msg, int lineno) return 1; } -/* symtable_enter_block() gets a reference via PySTEntry_New(). +/* symtable_enter_block() gets a reference via ste_new. This reference is released when the block is exited, via the DECREF in symtable_exit_block(). */ @@ -759,7 +759,7 @@ symtable_enter_block(struct symtable *st, identifier name, _Py_block_ty block, } Py_DECREF(st->st_cur); } - st->st_cur = PySTEntry_New(st, name, block, ast, lineno); + st->st_cur = ste_new(st, name, block, ast, lineno); if (st->st_cur == NULL) return 0; if (name == GET_IDENTIFIER(top)) |