mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Source changes for compilation
These are the commits from https://github.com/ahgamut/cpython/tree/cosmo_py36 squashed for simplicity. Also included is the pyconfig.h used for compilation. The pyconfig.h has to be changed manually in case Cosmopolitan gets new features.
This commit is contained in:
parent
0c4c56ff39
commit
5ef64dbcdb
82 changed files with 2009 additions and 424 deletions
6
third_party/python/Objects/object.c
vendored
6
third_party/python/Objects/object.c
vendored
|
@ -464,19 +464,19 @@ _PyObject_Dump(PyObject* op)
|
|||
return;
|
||||
}
|
||||
|
||||
PyGILState_STATE gil;
|
||||
// PyGILState_STATE gil;
|
||||
PyObject *error_type, *error_value, *error_traceback;
|
||||
|
||||
fprintf(stderr, "object : ");
|
||||
fflush(stderr);
|
||||
gil = PyGILState_Ensure();
|
||||
// gil = PyGILState_Ensure();
|
||||
|
||||
PyErr_Fetch(&error_type, &error_value, &error_traceback);
|
||||
(void)PyObject_Print(op, stderr, 0);
|
||||
fflush(stderr);
|
||||
PyErr_Restore(error_type, error_value, error_traceback);
|
||||
|
||||
PyGILState_Release(gil);
|
||||
// PyGILState_Release(gil);
|
||||
/* XXX(twouters) cast refcount to long until %zd is
|
||||
universally available */
|
||||
fprintf(stderr, "\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue