Commit 58b4dd04 authored by Kevin Modzelewski's avatar Kevin Modzelewski Committed by Kevin Modzelewski

Get the sharedmods (ctypes, etc) building

parent 0e67e50f
...@@ -141,8 +141,8 @@ PyAPI_FUNC(void) PyGC_RegisterStaticConstantLocation(PyObject**) PYSTON_NOEXCEPT ...@@ -141,8 +141,8 @@ PyAPI_FUNC(void) PyGC_RegisterStaticConstantLocation(PyObject**) PYSTON_NOEXCEPT
PyAPI_FUNC(PyObject*) _PyGC_GetGarbage(void) PYSTON_NOEXCEPT; PyAPI_FUNC(PyObject*) _PyGC_GetGarbage(void) PYSTON_NOEXCEPT;
// Pyston addition: // Pyston addition:
PyAPI_FUNC(void) PyGC_Enable() PYSTON_NOEXCEPT; PyAPI_FUNC(void) PyGC_Enable(void) PYSTON_NOEXCEPT;
PyAPI_FUNC(void) PyGC_Disable() PYSTON_NOEXCEPT; PyAPI_FUNC(void) PyGC_Disable(void) PYSTON_NOEXCEPT;
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -159,7 +159,7 @@ get_handler_name(struct HandlerInfo *hinfo) ...@@ -159,7 +159,7 @@ get_handler_name(struct HandlerInfo *hinfo)
{ {
PyObject *name = hinfo->nameobj; PyObject *name = hinfo->nameobj;
if (name == NULL) { if (name == NULL) {
name = PyGC_AddRoot(PyString_FromString(hinfo->name)); name = PyString_FromString(hinfo->name);
hinfo->nameobj = name; hinfo->nameobj = name;
} }
Py_XINCREF(name); Py_XINCREF(name);
...@@ -1891,7 +1891,7 @@ MODULE_INITFUNC(void) ...@@ -1891,7 +1891,7 @@ MODULE_INITFUNC(void)
/* Add some symbolic constants to the module */ /* Add some symbolic constants to the module */
if (ErrorObject == NULL) { if (ErrorObject == NULL) {
ErrorObject = PyGC_AddRoot(PyErr_NewException("xml.parsers.expat.ExpatError", ErrorObject = PyGC_RegisterStaticConstant(PyErr_NewException("xml.parsers.expat.ExpatError",
NULL, NULL)); NULL, NULL));
if (ErrorObject == NULL) if (ErrorObject == NULL)
return; return;
......
...@@ -930,8 +930,9 @@ setup_readline(void) ...@@ -930,8 +930,9 @@ setup_readline(void)
strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?"); strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
/* All nonalphanums except '.' */ /* All nonalphanums except '.' */
begidx = PyInt_FromLong(0L); begidx = PyGC_RegisterStaticConstant(PyInt_FromLong(0L));
endidx = PyInt_FromLong(0L); endidx = PyGC_RegisterStaticConstant(PyInt_FromLong(0L));
PyGC_RegisterStaticConstantLocation(&completer);
/* Initialize (allows .inputrc to override) /* Initialize (allows .inputrc to override)
* *
* XXX: A bug in the readline-2.2 library causes a memory leak * XXX: A bug in the readline-2.2 library causes a memory leak
......
...@@ -4827,7 +4827,7 @@ extern "C" void Py_Finalize() noexcept { ...@@ -4827,7 +4827,7 @@ extern "C" void Py_Finalize() noexcept {
} }
for (auto p : constant_locations) { for (auto p : constant_locations) {
Py_DECREF(*p); Py_XDECREF(*p);
} }
constant_locations.clear(); constant_locations.clear();
......
# expected: reffail
from future_builtins import hex, oct, map, zip, filter from future_builtins import hex, oct, map, zip, filter
from itertools import imap, izip, ifilter from itertools import imap, izip, ifilter
......
# expected: reffail
import bz2 import bz2
print bz2.decompress(bz2.compress("hello world")) print bz2.decompress(bz2.compress("hello world"))
# expected: reffail
import curses, sys import curses, sys
try: try:
......
# expected: reffail
import grp import grp
print grp.getgrnam("root") print grp.getgrnam("root")
# expected: reffail
import os import os
import pty import pty
import subprocess import subprocess
......
# expected: reffail
import termios, sys import termios, sys
fd = sys.stdout.fileno() fd = sys.stdout.fileno()
try: try:
......
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