Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Kirill Smelkov
cpython
Commits
3b03b09f
Commit
3b03b09f
authored
Jun 27, 2019
by
Benjamin Peterson
Committed by
GitHub
Jun 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
closes bpo-37437: Update vendorized expat to 2.2.7. (GH-14436)
parent
44f91c38
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
32 deletions
+22
-32
Misc/NEWS.d/next/Library/2019-06-27-20-33-50.bpo-37437.du39_A.rst
...S.d/next/Library/2019-06-27-20-33-50.bpo-37437.du39_A.rst
+1
-0
Modules/expat/expat.h
Modules/expat/expat.h
+1
-1
Modules/expat/expat_external.h
Modules/expat/expat_external.h
+5
-5
Modules/expat/internal.h
Modules/expat/internal.h
+5
-0
Modules/expat/winconfig.h
Modules/expat/winconfig.h
+0
-4
Modules/expat/xmlparse.c
Modules/expat/xmlparse.c
+10
-19
Modules/expat/xmltok.c
Modules/expat/xmltok.c
+0
-3
No files found.
Misc/NEWS.d/next/Library/2019-06-27-20-33-50.bpo-37437.du39_A.rst
0 → 100644
View file @
3b03b09f
Update vendorized expat version to 2.2.7.
Modules/expat/expat.h
View file @
3b03b09f
...
...
@@ -1076,7 +1076,7 @@ XML_GetFeatureList(void);
*/
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 2
#define XML_MICRO_VERSION
6
#define XML_MICRO_VERSION
7
#ifdef __cplusplus
}
...
...
Modules/expat/expat_external.h
View file @
3b03b09f
...
...
@@ -35,10 +35,6 @@
/* External API definitions */
/* Namespace external symbols to allow multiple libexpat version to
co-exist. */
#include "pyexpatns.h"
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
# define XML_USE_MSC_EXTENSIONS 1
#endif
...
...
@@ -97,7 +93,11 @@
# endif
#endif
/* not defined XML_STATIC */
#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4)
#ifndef XML_ENABLE_VISIBILITY
# define XML_ENABLE_VISIBILITY 0
#endif
#if !defined(XMLIMPORT) && XML_ENABLE_VISIBILITY
# define XMLIMPORT __attribute__ ((visibility ("default")))
#endif
...
...
Modules/expat/internal.h
View file @
3b03b09f
...
...
@@ -115,6 +115,11 @@ extern "C" {
#endif
#ifdef XML_ENABLE_VISIBILITY
#if XML_ENABLE_VISIBILITY
__attribute__
((
visibility
(
"default"
)))
#endif
#endif
void
_INTERNAL_trim_to_complete_utf8_characters
(
const
char
*
from
,
const
char
**
fromLimRef
);
...
...
Modules/expat/winconfig.h
View file @
3b03b09f
...
...
@@ -53,10 +53,6 @@
/* we will assume all Windows platforms are little endian */
#define BYTEORDER 1234
/* Windows has memmove() available. */
#define HAVE_MEMMOVE
#endif
/* !defined(HAVE_EXPAT_CONFIG_H) */
...
...
Modules/expat/xmlparse.c
View file @
3b03b09f
/*
19ac4776051591216f1874e34ee99b6a43a3784c8bd7d70efeb9258dd22b906a (2.2.6
+)
/*
69df5be70289a11fb834869ce4a91c23c1d9dd04baffcbd10e86742d149a080c (2.2.7
+)
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
...
...
@@ -164,15 +164,6 @@ typedef char ICHAR;
/* Do safe (NULL-aware) pointer arithmetic */
#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
/* Handle the case where memmove() doesn't exist. */
#ifndef HAVE_MEMMOVE
#ifdef HAVE_BCOPY
#define memmove(d,s,l) bcopy((s),(d),(l))
#else
#error memmove does not exist on this platform, nor is a substitute available
#endif
/* HAVE_BCOPY */
#endif
/* HAVE_MEMMOVE */
#include "internal.h"
#include "xmltok.h"
#include "xmlrole.h"
...
...
@@ -747,7 +738,7 @@ writeRandomBytes_dev_urandom(void * target, size_t count) {
#endif
/* ! defined(HAVE_ARC4RANDOM_BUF) && ! defined(HAVE_ARC4RANDOM) */
#if defined(HAVE_ARC4RANDOM)
#if defined(HAVE_ARC4RANDOM)
&& ! defined(HAVE_ARC4RANDOM_BUF)
static
void
writeRandomBytes_arc4random
(
void
*
target
,
size_t
count
)
{
...
...
@@ -765,7 +756,7 @@ writeRandomBytes_arc4random(void * target, size_t count) {
}
}
#endif
/* defined(HAVE_ARC4RANDOM) */
#endif
/* defined(HAVE_ARC4RANDOM)
&& ! defined(HAVE_ARC4RANDOM_BUF)
*/
#ifdef _WIN32
...
...
@@ -3019,7 +3010,7 @@ doContent(XML_Parser parser,
enum
XML_Error
result
;
if
(
parser
->
m_startCdataSectionHandler
)
parser
->
m_startCdataSectionHandler
(
parser
->
m_handlerArg
);
#if 0
/* BEGIN disabled code */
/* Suppose you doing a transformation on a document that involves
changing only the character data. You set up a defaultHandler
and a characterDataHandler. The defaultHandler simply copies
...
...
@@ -3032,9 +3023,9 @@ doContent(XML_Parser parser,
However, now we have a start/endCdataSectionHandler, so it seems
easier to let the user deal with this.
*/
else if (parser->m_characterDataHandler)
else
if
(
0
&&
parser
->
m_characterDataHandler
)
parser
->
m_characterDataHandler
(
parser
->
m_handlerArg
,
parser
->
m_dataBuf
,
0
);
#endif
/* END disabled code */
else
if
(
parser
->
m_defaultHandler
)
reportDefault
(
parser
,
enc
,
s
,
next
);
result
=
doCdataSection
(
parser
,
enc
,
&
next
,
end
,
nextPtr
,
haveMore
);
...
...
@@ -3731,11 +3722,11 @@ doCdataSection(XML_Parser parser,
case
XML_TOK_CDATA_SECT_CLOSE
:
if
(
parser
->
m_endCdataSectionHandler
)
parser
->
m_endCdataSectionHandler
(
parser
->
m_handlerArg
);
#if 0
/* BEGIN disabled code */
/* see comment under XML_TOK_CDATA_SECT_OPEN */
else if (parser->m_characterDataHandler)
else
if
(
0
&&
parser
->
m_characterDataHandler
)
parser
->
m_characterDataHandler
(
parser
->
m_handlerArg
,
parser
->
m_dataBuf
,
0
);
#endif
/* END disabled code */
else
if
(
parser
->
m_defaultHandler
)
reportDefault
(
parser
,
enc
,
s
,
next
);
*
startPtr
=
next
;
...
...
@@ -6080,7 +6071,7 @@ setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType)
else
poolDiscard
(
&
dtd
->
pool
);
elementType
->
prefix
=
prefix
;
break
;
}
}
return
1
;
...
...
Modules/expat/xmltok.c
View file @
3b03b09f
...
...
@@ -30,9 +30,6 @@
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if !defined(_WIN32) && defined(HAVE_EXPAT_CONFIG_H)
# include <pyconfig.h>
#endif
#include <stddef.h>
#include <string.h>
/* memcpy */
...
...
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