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
48daafe7
Commit
48daafe7
authored
Feb 02, 2013
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Plain Diff
merge heads
parents
a19c4886
7fcb9796
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
375 additions
and
253 deletions
+375
-253
Misc/NEWS
Misc/NEWS
+2
-0
Modules/expat/COPYING
Modules/expat/COPYING
+1
-0
Modules/expat/amigaconfig.h
Modules/expat/amigaconfig.h
+0
-64
Modules/expat/ascii.h
Modules/expat/ascii.h
+7
-0
Modules/expat/expat.h
Modules/expat/expat.h
+27
-2
Modules/expat/expat_external.h
Modules/expat/expat_external.h
+2
-2
Modules/expat/internal.h
Modules/expat/internal.h
+1
-1
Modules/expat/watcomconfig.h
Modules/expat/watcomconfig.h
+47
-0
Modules/expat/xmlparse.c
Modules/expat/xmlparse.c
+248
-175
Modules/expat/xmlrole.c
Modules/expat/xmlrole.c
+9
-3
Modules/expat/xmltok.c
Modules/expat/xmltok.c
+17
-5
Modules/expat/xmltok_impl.c
Modules/expat/xmltok_impl.c
+5
-1
Modules/expat/xmltok_ns.c
Modules/expat/xmltok_ns.c
+9
-0
No files found.
Misc/NEWS
View file @
48daafe7
...
...
@@ -202,6 +202,8 @@ Core and Builtins
Library
-------
- Issue #14340: Upgrade the embedded expat library to version 2.1.0.
- Issue #11159: SAX parser now supports unicode file names.
- Issue #6972: The zipfile module no longer overwrites files outside of
...
...
Modules/expat/COPYING
View file @
48daafe7
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
and Clark Cooper
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
...
...
Modules/expat/amigaconfig.h
View file @
48daafe7
...
...
@@ -10,66 +10,12 @@
/* Define to 1 if you have the <check.h> header file. */
#undef HAVE_CHECK_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "expat-bugs@mail.libexpat.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "expat"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "expat 1.95.8"
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.95.8"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* whether byteorder is bigendian */
#define WORDS_BIGENDIAN
...
...
@@ -83,14 +29,4 @@
/* Define to make XML Namespaces functionality available. */
#define XML_NS
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `long' if <sys/types.h> does not define. */
#undef off_t
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
#endif
/* AMIGACONFIG_H */
Modules/expat/ascii.h
View file @
48daafe7
...
...
@@ -83,3 +83,10 @@
#define ASCII_LSQB 0x5B
#define ASCII_RSQB 0x5D
#define ASCII_UNDERSCORE 0x5F
#define ASCII_LPAREN 0x28
#define ASCII_RPAREN 0x29
#define ASCII_FF 0x0C
#define ASCII_SLASH 0x2F
#define ASCII_HASH 0x23
#define ASCII_PIPE 0x7C
#define ASCII_COMMA 0x2C
Modules/expat/expat.h
View file @
48daafe7
...
...
@@ -742,6 +742,29 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser);
XMLPARSEAPI
(
int
)
XML_GetIdAttributeIndex
(
XML_Parser
parser
);
#ifdef XML_ATTR_INFO
/* Source file byte offsets for the start and end of attribute names and values.
The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
file an attribute value of "blah" will yield:
info->valueEnd - info->valueStart = 4 bytes.
*/
typedef
struct
{
XML_Index
nameStart
;
/* Offset to beginning of the attribute name. */
XML_Index
nameEnd
;
/* Offset after the attribute name's last byte. */
XML_Index
valueStart
;
/* Offset to beginning of the attribute value. */
XML_Index
valueEnd
;
/* Offset after the attribute value's last byte. */
}
XML_AttrInfo
;
/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
passed in last call to the XML_StartElementHandler that were specified
in the start-tag rather than defaulted. Each attribute/value pair counts
as 1; thus the number of entries in the array is
XML_GetSpecifiedAttributeCount(parser) / 2.
*/
XMLPARSEAPI
(
const
XML_AttrInfo
*
)
XML_GetAttributeInfo
(
XML_Parser
parser
);
#endif
/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
detected. The last call to XML_Parse must have isFinal true; len
may be zero for this call (or any other).
...
...
@@ -994,7 +1017,9 @@ enum XML_FeatureEnum {
XML_FEATURE_MIN_SIZE
,
XML_FEATURE_SIZEOF_XML_CHAR
,
XML_FEATURE_SIZEOF_XML_LCHAR
,
XML_FEATURE_NS
XML_FEATURE_NS
,
XML_FEATURE_LARGE_SIZE
,
XML_FEATURE_ATTR_INFO
/* Additional features must be added to the end of this enum. */
};
...
...
@@ -1014,7 +1039,7 @@ XML_GetFeatureList(void);
change to major or minor version.
*/
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION
0
#define XML_MINOR_VERSION
1
#define XML_MICRO_VERSION 0
#ifdef __cplusplus
...
...
Modules/expat/expat_external.h
View file @
48daafe7
...
...
@@ -38,9 +38,9 @@
system headers may assume the cdecl convention.
*/
#ifndef XMLCALL
#if defined(
XML_USE_MSC_EXTENSIONS
)
#if defined(
_MSC_VER
)
#define XMLCALL __cdecl
#elif defined(__GNUC__) && defined(__i386)
#elif defined(__GNUC__) && defined(__i386)
&& !defined(__INTEL_COMPILER)
#define XMLCALL __attribute__((cdecl))
#else
/* For any platform which uses this definition and supports more than
...
...
Modules/expat/internal.h
View file @
48daafe7
...
...
@@ -20,7 +20,7 @@
and therefore subject to change.
*/
#if defined(__GNUC__) && defined(__i386__)
#if defined(__GNUC__) && defined(__i386__)
&& !defined(__MINGW32__)
/* We'll use this version by default only where we know it helps.
regparm() generates warnings on Solaris boxes. See SF bug #692878.
...
...
Modules/expat/watcomconfig.h
0 → 100644
View file @
48daafe7
/* expat_config.h for use with Open Watcom 1.5 and above. */
#ifndef WATCOMCONFIG_H
#define WATCOMCONFIG_H
#ifdef __NT__
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#endif
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#define BYTEORDER 1234
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "expat-bugs@mail.libexpat.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "expat"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "expat 2.0.0"
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#define PACKAGE_VERSION "2.0.0"
/* Define to specify how much context to retain around the current parse
point. */
#define XML_CONTEXT_BYTES 1024
/* Define to make parameter entity parsing functionality available. */
#define XML_DTD 1
/* Define to make XML Namespaces functionality available. */
#define XML_NS 1
#endif
Modules/expat/xmlparse.c
View file @
48daafe7
This diff is collapsed.
Click to expand it.
Modules/expat/xmlrole.c
View file @
48daafe7
...
...
@@ -2,20 +2,22 @@
See the file COPYING for copying permission.
*/
#include <stddef.h>
#ifdef COMPILED_FROM_DSP
#include "winconfig.h"
#elif defined(MACOS_CLASSIC)
#include "macconfig.h"
#elif defined(__amigaos
4
__)
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
#else
#ifdef HAVE_EXPAT_CONFIG_H
#include <expat_config.h>
#endif
#endif
/* ndef COMPILED_FROM_DSP */
#include <stddef.h>
#include "expat_external.h"
#include "internal.h"
#include "xmlrole.h"
...
...
@@ -53,12 +55,16 @@ static const char KW_IDREF[] = {
ASCII_I
,
ASCII_D
,
ASCII_R
,
ASCII_E
,
ASCII_F
,
'\0'
};
static
const
char
KW_IDREFS
[]
=
{
ASCII_I
,
ASCII_D
,
ASCII_R
,
ASCII_E
,
ASCII_F
,
ASCII_S
,
'\0'
};
#ifdef XML_DTD
static
const
char
KW_IGNORE
[]
=
{
ASCII_I
,
ASCII_G
,
ASCII_N
,
ASCII_O
,
ASCII_R
,
ASCII_E
,
'\0'
};
#endif
static
const
char
KW_IMPLIED
[]
=
{
ASCII_I
,
ASCII_M
,
ASCII_P
,
ASCII_L
,
ASCII_I
,
ASCII_E
,
ASCII_D
,
'\0'
};
#ifdef XML_DTD
static
const
char
KW_INCLUDE
[]
=
{
ASCII_I
,
ASCII_N
,
ASCII_C
,
ASCII_L
,
ASCII_U
,
ASCII_D
,
ASCII_E
,
'\0'
};
#endif
static
const
char
KW_NDATA
[]
=
{
ASCII_N
,
ASCII_D
,
ASCII_A
,
ASCII_T
,
ASCII_A
,
'\0'
};
static
const
char
KW_NMTOKEN
[]
=
{
...
...
Modules/expat/xmltok.c
View file @
48daafe7
...
...
@@ -2,20 +2,22 @@
See the file COPYING for copying permission.
*/
#include <stddef.h>
#ifdef COMPILED_FROM_DSP
#include "winconfig.h"
#elif defined(MACOS_CLASSIC)
#include "macconfig.h"
#elif defined(__amigaos
4
__)
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
#else
#ifdef HAVE_EXPAT_CONFIG_H
#include <expat_config.h>
#endif
#endif
/* ndef COMPILED_FROM_DSP */
#include <stddef.h>
#include "expat_external.h"
#include "internal.h"
#include "xmltok.h"
...
...
@@ -295,7 +297,9 @@ sb_charMatches(const ENCODING *enc, const char *p, int c)
#endif
#define PREFIX(ident) normal_ ## ident
#define XML_TOK_IMPL_C
#include "xmltok_impl.c"
#undef XML_TOK_IMPL_C
#undef MINBPC
#undef BYTE_TYPE
...
...
@@ -692,7 +696,9 @@ little2_isNmstrtMin(const ENCODING *enc, const char *p)
#define IS_NMSTRT_CHAR(enc, p, n) (0)
#define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p)
#define XML_TOK_IMPL_C
#include "xmltok_impl.c"
#undef XML_TOK_IMPL_C
#undef MINBPC
#undef BYTE_TYPE
...
...
@@ -831,7 +837,9 @@ big2_isNmstrtMin(const ENCODING *enc, const char *p)
#define IS_NMSTRT_CHAR(enc, p, n) (0)
#define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p)
#define XML_TOK_IMPL_C
#include "xmltok_impl.c"
#undef XML_TOK_IMPL_C
#undef MINBPC
#undef BYTE_TYPE
...
...
@@ -1337,7 +1345,7 @@ unknown_toUtf16(const ENCODING *enc,
ENCODING
*
XmlInitUnknownEncoding
(
void
*
mem
,
int
*
table
,
CONVERTER
convert
,
CONVERTER
convert
,
void
*
userData
)
{
int
i
;
...
...
@@ -1610,7 +1618,9 @@ initScan(const ENCODING * const *encodingTable,
#define NS(x) x
#define ns(x) x
#define XML_TOK_NS_C
#include "xmltok_ns.c"
#undef XML_TOK_NS_C
#undef NS
#undef ns
...
...
@@ -1619,7 +1629,9 @@ initScan(const ENCODING * const *encodingTable,
#define NS(x) x ## NS
#define ns(x) x ## _ns
#define XML_TOK_NS_C
#include "xmltok_ns.c"
#undef XML_TOK_NS_C
#undef NS
#undef ns
...
...
@@ -1627,7 +1639,7 @@ initScan(const ENCODING * const *encodingTable,
ENCODING
*
XmlInitUnknownEncodingNS
(
void
*
mem
,
int
*
table
,
CONVERTER
convert
,
CONVERTER
convert
,
void
*
userData
)
{
ENCODING
*
enc
=
XmlInitUnknownEncoding
(
mem
,
table
,
convert
,
userData
);
...
...
Modules/expat/xmltok_impl.c
View file @
48daafe7
...
...
@@ -2,6 +2,9 @@
See the file COPYING for copying permission.
*/
/* This file is included! */
#ifdef XML_TOK_IMPL_C
#ifndef IS_INVALID_CHAR
#define IS_INVALID_CHAR(enc, ptr, n) (0)
#endif
...
...
@@ -882,7 +885,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
const
char
**
nextTokPtr
)
{
if
(
ptr
==
end
)
return
-
XML_TOK_PERCENT
;
return
XML_TOK_PARTIAL
;
switch
(
BYTE_TYPE
(
enc
,
ptr
))
{
CHECK_NMSTRT_CASES
(
enc
,
ptr
,
end
,
nextTokPtr
)
case
BT_S
:
case
BT_LF
:
case
BT_CR
:
case
BT_PERCNT
:
...
...
@@ -1777,3 +1780,4 @@ PREFIX(updatePosition)(const ENCODING *enc,
#undef CHECK_NMSTRT_CASE
#undef CHECK_NMSTRT_CASES
#endif
/* XML_TOK_IMPL_C */
Modules/expat/xmltok_ns.c
View file @
48daafe7
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* This file is included! */
#ifdef XML_TOK_NS_C
const
ENCODING
*
NS
(
XmlGetUtf8InternalEncoding
)(
void
)
{
...
...
@@ -104,3 +111,5 @@ NS(XmlParseXmlDecl)(int isGeneralTextEntity,
encoding
,
standalone
);
}
#endif
/* XML_TOK_NS_C */
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