summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-11-20 04:31:07 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-11-20 04:31:07 (GMT)
commitd8f65973185f3603f4079f189eee6ec22d1ebcf5 (patch)
tree5aeaac045988f228b6aa38dbe1242bbb7768da05 /Python
parentb304d0b46f69b16f73b429293a606253cc4c35d3 (diff)
downloadcpython-d8f65973185f3603f4079f189eee6ec22d1ebcf5.zip
cpython-d8f65973185f3603f4079f189eee6ec22d1ebcf5.tar.gz
cpython-d8f65973185f3603f4079f189eee6ec22d1ebcf5.tar.bz2
new plan: functions that want 'tmp' can declare it
Diffstat (limited to 'Python')
-rw-r--r--Python/Python-ast.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 8de5314..4d26ec8 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -3374,10 +3374,9 @@ failed:
int
obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
+ PyObject *tmp = NULL;
if (obj == Py_None) {
*out = NULL;
@@ -3523,10 +3522,9 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
int
obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
+ PyObject *tmp = NULL;
int lineno;
int col_offset;
@@ -4719,10 +4717,9 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
int
obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
+ PyObject *tmp = NULL;
int lineno;
int col_offset;
@@ -5835,9 +5832,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
int
obj2ast_expr_context(PyObject* obj, expr_context_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
isinstance = PyObject_IsInstance(obj, (PyObject *)Load_type);
if (isinstance == -1) {
@@ -5895,10 +5890,9 @@ obj2ast_expr_context(PyObject* obj, expr_context_ty* out, PyArena* arena)
int
obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
+ PyObject *tmp = NULL;
if (obj == Py_None) {
*out = NULL;
@@ -6018,9 +6012,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
int
obj2ast_boolop(PyObject* obj, boolop_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
isinstance = PyObject_IsInstance(obj, (PyObject *)And_type);
if (isinstance == -1) {
@@ -6046,9 +6038,7 @@ obj2ast_boolop(PyObject* obj, boolop_ty* out, PyArena* arena)
int
obj2ast_operator(PyObject* obj, operator_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
isinstance = PyObject_IsInstance(obj, (PyObject *)Add_type);
if (isinstance == -1) {
@@ -6154,9 +6144,7 @@ obj2ast_operator(PyObject* obj, operator_ty* out, PyArena* arena)
int
obj2ast_unaryop(PyObject* obj, unaryop_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
isinstance = PyObject_IsInstance(obj, (PyObject *)Invert_type);
if (isinstance == -1) {
@@ -6198,9 +6186,7 @@ obj2ast_unaryop(PyObject* obj, unaryop_ty* out, PyArena* arena)
int
obj2ast_cmpop(PyObject* obj, cmpop_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
isinstance = PyObject_IsInstance(obj, (PyObject *)Eq_type);
if (isinstance == -1) {
@@ -6354,10 +6340,9 @@ failed:
int
obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena)
{
- PyObject* tmp = NULL;
int isinstance;
- tmp = tmp;
+ PyObject *tmp = NULL;
int lineno;
int col_offset;