Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
24fc085f
Commit
24fc085f
authored
May 06, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1155 from kmod/reftests2
Fix some pyexpat issues
parents
6de98e5a
a726eee9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
14 additions
and
23 deletions
+14
-23
from_cpython/Include/Python.h
from_cpython/Include/Python.h
+8
-0
from_cpython/Lib/test/test_docxmlrpc.py
from_cpython/Lib/test/test_docxmlrpc.py
+0
-2
from_cpython/Lib/test/test_minidom.py
from_cpython/Lib/test/test_minidom.py
+0
-2
from_cpython/Lib/test/test_multiprocessing.py
from_cpython/Lib/test/test_multiprocessing.py
+2
-1
from_cpython/Lib/test/test_plistlib.py
from_cpython/Lib/test/test_plistlib.py
+0
-2
from_cpython/Lib/test/test_sax.py
from_cpython/Lib/test/test_sax.py
+0
-2
from_cpython/Lib/test/test_unpack.py
from_cpython/Lib/test/test_unpack.py
+0
-2
from_cpython/Modules/pyexpat.c
from_cpython/Modules/pyexpat.c
+4
-10
test/cpython/test_pyexpat.py
test/cpython/test_pyexpat.py
+0
-2
No files found.
from_cpython/Include/Python.h
View file @
24fc085f
...
...
@@ -32,6 +32,14 @@
#include "patchlevel.h"
#include "pyconfig.h"
/* Cyclic gc is always enabled, starting with release 2.3a1. Supply the
* old symbol for the benefit of extension modules written before then
* that may be conditionalizing on it. The core doesn't use it anymore.
*/
#ifndef WITH_CYCLE_GC
#define WITH_CYCLE_GC 1
#endif
#include <limits.h>
#include <stdio.h>
...
...
from_cpython/Lib/test/test_docxmlrpc.py
View file @
24fc085f
# expected: reffail
# - negative ref
from
DocXMLRPCServer
import
DocXMLRPCServer
import
httplib
import
sys
...
...
from_cpython/Lib/test/test_minidom.py
View file @
24fc085f
# expected: reffail
# - "pyexpat.xmlparser needs a tp_traverse"
# test for xml.dom.minidom
import
pickle
...
...
from_cpython/Lib/test/test_multiprocessing.py
View file @
24fc085f
# expected: fail
# skip-if: True
# - This test hangs and the tester fails to clean it up.
#
# Unit tests for the multiprocessing package
#
...
...
from_cpython/Lib/test/test_plistlib.py
View file @
24fc085f
# expected: reffail
# - negative ref
# Copyright (C) 2003 Python Software Foundation
import
unittest
...
...
from_cpython/Lib/test/test_sax.py
View file @
24fc085f
# expected: reffail
# - "pyexpat.xmlparser needs a tp_traverse"
# regression test for SAX 2.0 -*- coding: utf-8 -*-
# $Id$
...
...
from_cpython/Lib/test/test_unpack.py
View file @
24fc085f
# expected: reffail
# - unknown segfault
doctests
=
"""
Unpack tuple
...
...
from_cpython/Modules/pyexpat.c
View file @
24fc085f
...
...
@@ -1143,9 +1143,7 @@ xmlparse_ExternalEntityParserCreate(xmlparseobject *self, PyObject *args)
for
(
i
=
0
;
handler_info
[
i
].
name
!=
NULL
;
i
++
)
/* do nothing */
;
// Pyston change: use GC alloc routine because those contain Python objects
// new_parser->handlers = malloc(sizeof(PyObject *) * i);
new_parser
->
handlers
=
PyMem_Malloc
(
sizeof
(
PyObject
*
)
*
i
);
new_parser
->
handlers
=
malloc
(
sizeof
(
PyObject
*
)
*
i
);
if
(
!
new_parser
->
handlers
)
{
Py_DECREF
(
new_parser
);
return
PyErr_NoMemory
();
...
...
@@ -1364,9 +1362,7 @@ newxmlparseobject(char *encoding, char *namespace_separator, PyObject *intern)
for
(
i
=
0
;
handler_info
[
i
].
name
!=
NULL
;
i
++
)
/* do nothing */
;
// Pyston change: use GC alloc routine because those contain Python objects
// self->handlers = malloc(sizeof(PyObject *) * i);
self
->
handlers
=
PyMem_Malloc
(
sizeof
(
PyObject
*
)
*
i
);
self
->
handlers
=
malloc
(
sizeof
(
PyObject
*
)
*
i
);
if
(
!
self
->
handlers
)
{
Py_DECREF
(
self
);
return
PyErr_NoMemory
();
...
...
@@ -1397,8 +1393,7 @@ xmlparse_dealloc(xmlparseobject *self)
self
->
handlers
[
i
]
=
NULL
;
Py_XDECREF
(
temp
);
}
// Pyston change: object are allocated using the GC not malloc
// free(self->handlers);
free
(
self
->
handlers
);
self
->
handlers
=
NULL
;
}
if
(
self
->
buffer
!=
NULL
)
{
...
...
@@ -1891,8 +1886,7 @@ MODULE_INITFUNC(void)
/* Add some symbolic constants to the module */
if
(
ErrorObject
==
NULL
)
{
ErrorObject
=
PyGC_RegisterStaticConstant
(
PyErr_NewException
(
"xml.parsers.expat.ExpatError"
,
NULL
,
NULL
));
ErrorObject
=
PyErr_NewException
(
"xml.parsers.expat.ExpatError"
,
NULL
,
NULL
);
if
(
ErrorObject
==
NULL
)
return
;
}
...
...
test/cpython/test_pyexpat.py
View file @
24fc085f
# expected: reffail
# - "pyexpat.xmlparser needs a tp_traverse"
# XXX TypeErrors on calling handlers, or on bad return values from a
# handler, are obscure and unhelpful.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment