[Python-3000-checkins] r53952 - in python/branches/p3yk: Misc/developers.txt Parser/asdl_c.py Python/Python-ast.c Python/ceval.c

thomas.wouters python-3000-checkins at python.org
Mon Feb 26 19:20:20 CET 2007


Author: thomas.wouters
Date: Mon Feb 26 19:20:15 2007
New Revision: 53952

Modified:
   python/branches/p3yk/   (props changed)
   python/branches/p3yk/Misc/developers.txt
   python/branches/p3yk/Parser/asdl_c.py
   python/branches/p3yk/Python/Python-ast.c
   python/branches/p3yk/Python/ceval.c
Log:

Merged revisions 53912-53951 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r53919 | thomas.wouters | 2007-02-25 23:12:31 +0100 (Sun, 25 Feb 2007) | 8 lines
  
  
  Backported r51621 from p3yk:
  
  Don't use a fixed temporary name (gdbm).
  Don't use our own temp name creation (dbm).
  Should be backported to 2.5.
........
  r53935 | georg.brandl | 2007-02-26 14:51:29 +0100 (Mon, 26 Feb 2007) | 2 lines
  
  Backport from Py3k branch: fix refleak in PyString_Format.
........
  r53943 | jeremy.hylton | 2007-02-26 17:14:51 +0100 (Mon, 26 Feb 2007) | 2 lines
  
  Reformat long lines.
........
  r53947 | neal.norwitz | 2007-02-26 18:01:08 +0100 (Mon, 26 Feb 2007) | 1 line
  
  Add Steven Bethard to help out with patches.
........
  r53949 | georg.brandl | 2007-02-26 18:09:03 +0100 (Mon, 26 Feb 2007) | 3 lines
  
  Fix typo.
........
  r53951 | neal.norwitz | 2007-02-26 19:10:47 +0100 (Mon, 26 Feb 2007) | 5 lines
  
  Fix a couple of problems in generating the AST code:
   * use %r instead of backticks since backticks are going away in Py3k
   * PyArena_Malloc() already sets PyErr_NoMemory so we don't need to do it again
   * the signature for ast2obj_int incorrectly used a bool, rather than a long
........



Modified: python/branches/p3yk/Misc/developers.txt
==============================================================================
--- python/branches/p3yk/Misc/developers.txt	(original)
+++ python/branches/p3yk/Misc/developers.txt	Mon Feb 26 19:20:15 2007
@@ -17,6 +17,9 @@
 Permissions History
 -------------------
 
+- Steven Bethard (SF name "bediviere") added to the SourceForge Python
+  project 26 Feb 2007, by NCN, as a tracker tech.
+
 - Josiah Carlson (SF name "josiahcarlson") added to the SourceForge Python
   project 06 Jan 2007, by NCN, as a tracker tech.  He will maintain asyncore.
 

Modified: python/branches/p3yk/Parser/asdl_c.py
==============================================================================
--- python/branches/p3yk/Parser/asdl_c.py	(original)
+++ python/branches/p3yk/Parser/asdl_c.py	Mon Feb 26 19:20:15 2007
@@ -299,10 +299,8 @@
                 emit('}', 1)
 
         emit("p = (%s)PyArena_Malloc(arena, sizeof(*p));" % ctype, 1);
-        emit("if (!p) {", 1)
-        emit("PyErr_NoMemory();", 2)
+        emit("if (!p)", 1)
         emit("return NULL;", 2)
-        emit("}", 1)
         if union:
             self.emit_body_union(name, args, attrs)
         else:
@@ -474,7 +472,7 @@
     return PyBool_FromLong(b);
 }
 
-static PyObject* ast2obj_int(bool b)
+static PyObject* ast2obj_int(long b)
 {
     return PyInt_FromLong(b);
 }

Modified: python/branches/p3yk/Python/Python-ast.c
==============================================================================
--- python/branches/p3yk/Python/Python-ast.c	(original)
+++ python/branches/p3yk/Python/Python-ast.c	Mon Feb 26 19:20:15 2007
@@ -2,7 +2,7 @@
 
 
 /*
-   __version__ 53872.
+   __version__ 53873.
 
    This module must be committed separately after each AST grammar change;
    The __version__ number is set to the revision number of the commit
@@ -448,7 +448,7 @@
     return PyBool_FromLong(b);
 }
 
-static PyObject* ast2obj_int(bool b)
+static PyObject* ast2obj_int(long b)
 {
     return PyInt_FromLong(b);
 }
@@ -754,10 +754,8 @@
 {
         mod_ty p;
         p = (mod_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Module_kind;
         p->v.Module.body = body;
         return p;
@@ -768,10 +766,8 @@
 {
         mod_ty p;
         p = (mod_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Interactive_kind;
         p->v.Interactive.body = body;
         return p;
@@ -787,10 +783,8 @@
                 return NULL;
         }
         p = (mod_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Expression_kind;
         p->v.Expression.body = body;
         return p;
@@ -801,10 +795,8 @@
 {
         mod_ty p;
         p = (mod_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Suite_kind;
         p->v.Suite.body = body;
         return p;
@@ -827,10 +819,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = FunctionDef_kind;
         p->v.FunctionDef.name = name;
         p->v.FunctionDef.args = args;
@@ -853,10 +843,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = ClassDef_kind;
         p->v.ClassDef.name = name;
         p->v.ClassDef.bases = bases;
@@ -871,10 +859,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Return_kind;
         p->v.Return.value = value;
         p->lineno = lineno;
@@ -887,10 +873,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Delete_kind;
         p->v.Delete.targets = targets;
         p->lineno = lineno;
@@ -909,10 +893,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Assign_kind;
         p->v.Assign.targets = targets;
         p->v.Assign.value = value;
@@ -942,10 +924,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = AugAssign_kind;
         p->v.AugAssign.target = target;
         p->v.AugAssign.op = op;
@@ -971,10 +951,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = For_kind;
         p->v.For.target = target;
         p->v.For.iter = iter;
@@ -996,10 +974,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = While_kind;
         p->v.While.test = test;
         p->v.While.body = body;
@@ -1020,10 +996,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = If_kind;
         p->v.If.test = test;
         p->v.If.body = body;
@@ -1044,10 +1018,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = With_kind;
         p->v.With.context_expr = context_expr;
         p->v.With.optional_vars = optional_vars;
@@ -1063,10 +1035,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Raise_kind;
         p->v.Raise.type = type;
         p->v.Raise.inst = inst;
@@ -1082,10 +1052,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = TryExcept_kind;
         p->v.TryExcept.body = body;
         p->v.TryExcept.handlers = handlers;
@@ -1101,10 +1069,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = TryFinally_kind;
         p->v.TryFinally.body = body;
         p->v.TryFinally.finalbody = finalbody;
@@ -1123,10 +1089,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Assert_kind;
         p->v.Assert.test = test;
         p->v.Assert.msg = msg;
@@ -1140,10 +1104,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Import_kind;
         p->v.Import.names = names;
         p->lineno = lineno;
@@ -1162,10 +1124,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = ImportFrom_kind;
         p->v.ImportFrom.module = module;
         p->v.ImportFrom.names = names;
@@ -1180,10 +1140,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Global_kind;
         p->v.Global.names = names;
         p->lineno = lineno;
@@ -1201,10 +1159,8 @@
                 return NULL;
         }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Expr_kind;
         p->v.Expr.value = value;
         p->lineno = lineno;
@@ -1217,10 +1173,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Pass_kind;
         p->lineno = lineno;
         p->col_offset = col_offset;
@@ -1232,10 +1186,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Break_kind;
         p->lineno = lineno;
         p->col_offset = col_offset;
@@ -1247,10 +1199,8 @@
 {
         stmt_ty p;
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Continue_kind;
         p->lineno = lineno;
         p->col_offset = col_offset;
@@ -1268,10 +1218,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = BoolOp_kind;
         p->v.BoolOp.op = op;
         p->v.BoolOp.values = values;
@@ -1301,10 +1249,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = BinOp_kind;
         p->v.BinOp.left = left;
         p->v.BinOp.op = op;
@@ -1330,10 +1276,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = UnaryOp_kind;
         p->v.UnaryOp.op = op;
         p->v.UnaryOp.operand = operand;
@@ -1358,10 +1302,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Lambda_kind;
         p->v.Lambda.args = args;
         p->v.Lambda.body = body;
@@ -1391,10 +1333,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = IfExp_kind;
         p->v.IfExp.test = test;
         p->v.IfExp.body = body;
@@ -1410,10 +1350,8 @@
 {
         expr_ty p;
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Dict_kind;
         p->v.Dict.keys = keys;
         p->v.Dict.values = values;
@@ -1427,10 +1365,8 @@
 {
         expr_ty p;
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Set_kind;
         p->v.Set.elts = elts;
         p->lineno = lineno;
@@ -1449,10 +1385,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = ListComp_kind;
         p->v.ListComp.elt = elt;
         p->v.ListComp.generators = generators;
@@ -1472,10 +1406,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = GeneratorExp_kind;
         p->v.GeneratorExp.elt = elt;
         p->v.GeneratorExp.generators = generators;
@@ -1489,10 +1421,8 @@
 {
         expr_ty p;
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Yield_kind;
         p->v.Yield.value = value;
         p->lineno = lineno;
@@ -1511,10 +1441,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Compare_kind;
         p->v.Compare.left = left;
         p->v.Compare.ops = ops;
@@ -1535,10 +1463,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Call_kind;
         p->v.Call.func = func;
         p->v.Call.args = args;
@@ -1560,10 +1486,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Num_kind;
         p->v.Num.n = n;
         p->lineno = lineno;
@@ -1581,10 +1505,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Str_kind;
         p->v.Str.s = s;
         p->lineno = lineno;
@@ -1602,10 +1524,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Bytes_kind;
         p->v.Bytes.s = s;
         p->lineno = lineno;
@@ -1618,10 +1538,8 @@
 {
         expr_ty p;
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Ellipsis_kind;
         p->lineno = lineno;
         p->col_offset = col_offset;
@@ -1649,10 +1567,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Attribute_kind;
         p->v.Attribute.value = value;
         p->v.Attribute.attr = attr;
@@ -1683,10 +1599,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Subscript_kind;
         p->v.Subscript.value = value;
         p->v.Subscript.slice = slice;
@@ -1712,10 +1626,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Name_kind;
         p->v.Name.id = id;
         p->v.Name.ctx = ctx;
@@ -1735,10 +1647,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = List_kind;
         p->v.List.elts = elts;
         p->v.List.ctx = ctx;
@@ -1758,10 +1668,8 @@
                 return NULL;
         }
         p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Tuple_kind;
         p->v.Tuple.elts = elts;
         p->v.Tuple.ctx = ctx;
@@ -1775,10 +1683,8 @@
 {
         slice_ty p;
         p = (slice_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Slice_kind;
         p->v.Slice.lower = lower;
         p->v.Slice.upper = upper;
@@ -1791,10 +1697,8 @@
 {
         slice_ty p;
         p = (slice_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = ExtSlice_kind;
         p->v.ExtSlice.dims = dims;
         return p;
@@ -1810,10 +1714,8 @@
                 return NULL;
         }
         p = (slice_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = Index_kind;
         p->v.Index.value = value;
         return p;
@@ -1834,10 +1736,8 @@
                 return NULL;
         }
         p = (comprehension_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->target = target;
         p->iter = iter;
         p->ifs = ifs;
@@ -1850,10 +1750,8 @@
 {
         excepthandler_ty p;
         p = (excepthandler_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->type = type;
         p->name = name;
         p->body = body;
@@ -1869,10 +1767,8 @@
 {
         arguments_ty p;
         p = (arguments_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->args = args;
         p->vararg = vararg;
         p->varargannotation = varargannotation;
@@ -1894,10 +1790,8 @@
                 return NULL;
         }
         p = (arg_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = SimpleArg_kind;
         p->v.SimpleArg.arg = arg;
         p->v.SimpleArg.annotation = annotation;
@@ -1909,10 +1803,8 @@
 {
         arg_ty p;
         p = (arg_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->kind = NestedArgs_kind;
         p->v.NestedArgs.args = args;
         return p;
@@ -1933,10 +1825,8 @@
                 return NULL;
         }
         p = (keyword_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->arg = arg;
         p->value = value;
         return p;
@@ -1952,10 +1842,8 @@
                 return NULL;
         }
         p = (alias_ty)PyArena_Malloc(arena, sizeof(*p));
-        if (!p) {
-                PyErr_NoMemory();
+        if (!p)
                 return NULL;
-        }
         p->name = name;
         p->asname = asname;
         return p;
@@ -3125,7 +3013,7 @@
         if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return;
         if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)
                 return;
-        if (PyModule_AddStringConstant(m, "__version__", "53872") < 0)
+        if (PyModule_AddStringConstant(m, "__version__", "53873") < 0)
                 return;
         if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return;
         if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0)

Modified: python/branches/p3yk/Python/ceval.c
==============================================================================
--- python/branches/p3yk/Python/ceval.c	(original)
+++ python/branches/p3yk/Python/ceval.c	Mon Feb 26 19:20:15 2007
@@ -4077,7 +4077,8 @@
 			metaclass = (PyObject *) &PyType_Type;
 		Py_INCREF(metaclass);
 	}
-	result = PyObject_CallFunctionObjArgs(metaclass, name, bases, methods, NULL);
+	result = PyObject_CallFunctionObjArgs(metaclass, name, bases, methods,
+                                              NULL);
 	Py_DECREF(metaclass);
 	if (result == NULL && PyErr_ExceptionMatches(PyExc_TypeError)) {
 		/* A type error here likely means that the user passed
@@ -4091,7 +4092,8 @@
 		if (PyString_Check(pvalue)) {
 			PyObject *newmsg;
 			newmsg = PyString_FromFormat(
-				"Error when calling the metaclass bases\n    %s",
+				"Error when calling the metaclass bases\n"
+                                "    %s",
 				PyString_AS_STRING(pvalue));
 			if (newmsg != NULL) {
 				Py_DECREF(pvalue);


More information about the Python-3000-checkins mailing list