merge 3.3 (#20588)
authorBenjamin Peterson <benjamin@python.org>
Tue, 11 Feb 2014 03:41:40 +0000 (22:41 -0500)
committerBenjamin Peterson <benjamin@python.org>
Tue, 11 Feb 2014 03:41:40 +0000 (22:41 -0500)
1  2 
Misc/NEWS
Parser/asdl_c.py
Python/Python-ast.c

diff --cc Misc/NEWS
index 4b326ff98e06b2583ba7d95d572267f65030bb8b,ac1ba0da2ba6a9299202707888be963f43db7cea..06223600ac2fe3a6bd97892ce29ef78debad6e40
+++ b/Misc/NEWS
@@@ -10,28 -10,13 +10,30 @@@ Release date: 2014-02-0
  Core and Builtins
  -----------------
  
 -- Issue #20437: Fixed 21 potential bugs when deleting objects references.
 +- Issue #19255: The builtins module is restored to initial value before
 +  cleaning other modules.  The sys and builtins modules are cleaned last.
 +
+ - Issue #20588: Make Python-ast.c C89 compliant.
 +- Issue #20437: Fixed 22 potential bugs when deleting objects references.
 +
 +- Issue #20500: Displaying an exception at interpreter shutdown no longer
 +  risks triggering an assertion failure in PyObject_Str.
  
 -- Issue #20538: UTF-7 incremental decoder produced inconsistant string when
 +- Issue #20538: UTF-7 incremental decoder produced inconsistent string when
    input was truncated in BASE64 section.
  
 +- Issue #20404: io.TextIOWrapper (and hence the open() builtin) now uses the
 +  internal codec marking system added for issue #19619 to throw LookupError
 +  for known non-text encodings at stream construction time. The existing
 +  output type checks remain in place to deal with unmarked third party
 +  codecs.
 +
 +- Issue #17162: Add PyType_GetSlot.
 +
 +- Issue #20162: Fix an alignment issue in the siphash24() hash function which
 +  caused a crash on PowerPC 64-bit (ppc64).
 +
  Library
  -------
  
index 80e432a3e960d10491004fd2d2bac64440fc889a,4b84e0fd6b2a222bea86aec680e7b620e2fe1843..d6086e68bf2c51aa0cbca9cdb0a1b53d6de09875
@@@ -1203,14 -1150,17 +1203,18 @@@ PyObject* PyAST_mod2obj(mod_ty t
  mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
  {
      mod_ty res;
-     PyObject *req_type[] = {(PyObject*)Module_type, (PyObject*)Expression_type,
-                             (PyObject*)Interactive_type};
+     PyObject *req_type[3];
      char *req_name[] = {"Module", "Expression", "Interactive"};
      int isinstance;
+     req_type[0] = (PyObject*)Module_type;
+     req_type[1] = (PyObject*)Expression_type;
+     req_type[2] = (PyObject*)Interactive_type;
      assert(0 <= mode && mode <= 2);
  
 -    init_types();
 +    if (!init_types())
 +        return NULL;
  
      isinstance = PyObject_IsInstance(ast, req_type[mode]);
      if (isinstance == -1)
index e07a93fee8fb8c461834aa7b55618355fdc34fc3,aa032338af76832a415606647c72e579aa1b6579..44fdafc50aefb9c8de3b93224fbfed6ad3bdf36b
@@@ -7023,14 -6957,17 +7023,18 @@@ PyObject* PyAST_mod2obj(mod_ty t
  mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
  {
      mod_ty res;
-     PyObject *req_type[] = {(PyObject*)Module_type, (PyObject*)Expression_type,
-                             (PyObject*)Interactive_type};
+     PyObject *req_type[3];
      char *req_name[] = {"Module", "Expression", "Interactive"};
      int isinstance;
 -    
++
+     req_type[0] = (PyObject*)Module_type;
+     req_type[1] = (PyObject*)Expression_type;
+     req_type[2] = (PyObject*)Interactive_type;
 -    
++
      assert(0 <= mode && mode <= 2);
  
 -    init_types();
 +    if (!init_types())
 +        return NULL;
  
      isinstance = PyObject_IsInstance(ast, req_type[mode]);
      if (isinstance == -1)