Commit 9d179ce4 authored by Martin v. Löwis's avatar Martin v. Löwis

Prefix AST symbols with _Py_. Fixes #1637022.

parent fa941b93
This diff is collapsed.
......@@ -12,6 +12,8 @@ What's New in Python 2.5.1c1?
Core and builtins
-----------------
- Bug #1637022: Prefix AST symbols with _Py_.
- Prevent seg fault on shutdown which could occur if an object
raised a warning.
......
......@@ -260,7 +260,12 @@ class PrototypeVisitor(EmitVisitor):
argstr += ", PyArena *arena"
else:
argstr = "PyArena *arena"
self.emit("%s %s(%s);" % (ctype, name, argstr), 0)
margs = "a0"
for i in range(1, len(args)+1):
margs += ", a%d" % i
self.emit("#define %s(%s) _Py_%s(%s)" % (name, margs, name, margs), 0,
reflow = 0)
self.emit("%s _Py_%s(%s);" % (ctype, name, argstr), 0)
def visitProduct(self, prod, name):
self.emit_function(name, get_c_type(name),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment