Kaydet (Commit) fc03a94a authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Incorporate Expat 1.95.6.

üst 5a772d32
/* /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission.
See the file COPYING for copying permission.
*/ */
#define ASCII_A 0x41 #define ASCII_A 0x41
......
This diff is collapsed.
/* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following calling convention macros are defined for frequently
called functions:
FASTCALL - Used for those internal functions that have a simple
body and a low number of arguments and local variables.
PTRCALL - Used for functions called though function pointers.
PTRFASTCALL - Like PTRCALL, but for low number of arguments.
inline - Used for selected internal functions for which inlining
may improve performance on some platforms.
Note: Use of these macros is based on judgement, not hard rules,
and therefore subject to change.
*/
#if defined(__GNUC__)
/* Instability reported with egcs on a RedHat Linux 7.3.
Let's comment it out:
#define FASTCALL __attribute__((stdcall, regparm(3)))
and let's try this:
*/
#define FASTCALL __attribute__((regparm(3)))
#define PTRCALL
#define PTRFASTCALL __attribute__((regparm(3)))
#elif defined(WIN32)
/* Using __fastcall seems to have an unexpected negative effect under
MS VC++, especially for function pointers, so we won't use it for
now on that platform. It may be reconsidered for a future release
if it can be made more effective.
Likely reason: __fastcall on Windows is like stdcall, therefore
the compiler cannot perform stack optimizations for call clusters.
*/
#define FASTCALL
#define PTRCALL
#define PTRFASTCALL
#endif
#ifndef FASTCALL
#define FASTCALL
#endif
#ifndef PTRCALL
#define PTRCALL
#endif
#ifndef PTRFASTCALL
#define PTRFASTCALL
#endif
#ifndef XML_MIN_SIZE
#if !defined(__cplusplus) && !defined(inline)
#ifdef __GNUC__
#define inline __inline
#endif /* __GNUC__ */
#endif
#endif /* XML_MIN_SIZE */
#ifdef __cplusplus
#define inline inline
#else
#ifndef inline
#define inline
#endif
#endif
This diff is collapsed.
This diff is collapsed.
/* /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission.
See the file COPYING for copying permission.
*/ */
#ifndef XmlRole_INCLUDED #ifndef XmlRole_INCLUDED
#define XmlRole_INCLUDED 1 #define XmlRole_INCLUDED 1
#ifdef __VMS
/* 0 1 2 3 0 1 2 3
1234567890123456789012345678901 1234567890123456789012345678901 */
#define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt
#endif
#include "xmltok.h" #include "xmltok.h"
#ifdef __cplusplus #ifdef __cplusplus
...@@ -17,6 +22,7 @@ enum { ...@@ -17,6 +22,7 @@ enum {
XML_ROLE_NONE = 0, XML_ROLE_NONE = 0,
XML_ROLE_XML_DECL, XML_ROLE_XML_DECL,
XML_ROLE_INSTANCE_START, XML_ROLE_INSTANCE_START,
XML_ROLE_DOCTYPE_NONE,
XML_ROLE_DOCTYPE_NAME, XML_ROLE_DOCTYPE_NAME,
XML_ROLE_DOCTYPE_SYSTEM_ID, XML_ROLE_DOCTYPE_SYSTEM_ID,
XML_ROLE_DOCTYPE_PUBLIC_ID, XML_ROLE_DOCTYPE_PUBLIC_ID,
...@@ -24,11 +30,13 @@ enum { ...@@ -24,11 +30,13 @@ enum {
XML_ROLE_DOCTYPE_CLOSE, XML_ROLE_DOCTYPE_CLOSE,
XML_ROLE_GENERAL_ENTITY_NAME, XML_ROLE_GENERAL_ENTITY_NAME,
XML_ROLE_PARAM_ENTITY_NAME, XML_ROLE_PARAM_ENTITY_NAME,
XML_ROLE_ENTITY_NONE,
XML_ROLE_ENTITY_VALUE, XML_ROLE_ENTITY_VALUE,
XML_ROLE_ENTITY_SYSTEM_ID, XML_ROLE_ENTITY_SYSTEM_ID,
XML_ROLE_ENTITY_PUBLIC_ID, XML_ROLE_ENTITY_PUBLIC_ID,
XML_ROLE_ENTITY_COMPLETE, XML_ROLE_ENTITY_COMPLETE,
XML_ROLE_ENTITY_NOTATION_NAME, XML_ROLE_ENTITY_NOTATION_NAME,
XML_ROLE_NOTATION_NONE,
XML_ROLE_NOTATION_NAME, XML_ROLE_NOTATION_NAME,
XML_ROLE_NOTATION_SYSTEM_ID, XML_ROLE_NOTATION_SYSTEM_ID,
XML_ROLE_NOTATION_NO_SYSTEM_ID, XML_ROLE_NOTATION_NO_SYSTEM_ID,
...@@ -44,11 +52,13 @@ enum { ...@@ -44,11 +52,13 @@ enum {
XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS, XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
XML_ROLE_ATTRIBUTE_ENUM_VALUE, XML_ROLE_ATTRIBUTE_ENUM_VALUE,
XML_ROLE_ATTRIBUTE_NOTATION_VALUE, XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
XML_ROLE_ATTLIST_NONE,
XML_ROLE_ATTLIST_ELEMENT_NAME, XML_ROLE_ATTLIST_ELEMENT_NAME,
XML_ROLE_IMPLIED_ATTRIBUTE_VALUE, XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
XML_ROLE_REQUIRED_ATTRIBUTE_VALUE, XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
XML_ROLE_DEFAULT_ATTRIBUTE_VALUE, XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
XML_ROLE_FIXED_ATTRIBUTE_VALUE, XML_ROLE_FIXED_ATTRIBUTE_VALUE,
XML_ROLE_ELEMENT_NONE,
XML_ROLE_ELEMENT_NAME, XML_ROLE_ELEMENT_NAME,
XML_ROLE_CONTENT_ANY, XML_ROLE_CONTENT_ANY,
XML_ROLE_CONTENT_EMPTY, XML_ROLE_CONTENT_EMPTY,
...@@ -64,6 +74,8 @@ enum { ...@@ -64,6 +74,8 @@ enum {
XML_ROLE_CONTENT_ELEMENT_REP, XML_ROLE_CONTENT_ELEMENT_REP,
XML_ROLE_CONTENT_ELEMENT_OPT, XML_ROLE_CONTENT_ELEMENT_OPT,
XML_ROLE_CONTENT_ELEMENT_PLUS, XML_ROLE_CONTENT_ELEMENT_PLUS,
XML_ROLE_PI,
XML_ROLE_COMMENT,
#ifdef XML_DTD #ifdef XML_DTD
XML_ROLE_TEXT_DECL, XML_ROLE_TEXT_DECL,
XML_ROLE_IGNORE_SECT, XML_ROLE_IGNORE_SECT,
...@@ -73,15 +85,17 @@ enum { ...@@ -73,15 +85,17 @@ enum {
}; };
typedef struct prolog_state { typedef struct prolog_state {
int (*handler)(struct prolog_state *state, int (PTRCALL *handler) (struct prolog_state *state,
int tok, int tok,
const char *ptr, const char *ptr,
const char *end, const char *end,
const ENCODING *enc); const ENCODING *enc);
unsigned level; unsigned level;
int role_none;
#ifdef XML_DTD #ifdef XML_DTD
unsigned includeLevel; unsigned includeLevel;
int documentEntity; int documentEntity;
int inEntityValue;
#endif /* XML_DTD */ #endif /* XML_DTD */
} PROLOG_STATE; } PROLOG_STATE;
......
This diff is collapsed.
/* /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission.
See the file COPYING for copying permission.
*/ */
#ifndef XmlTok_INCLUDED #ifndef XmlTok_INCLUDED
...@@ -11,9 +10,11 @@ extern "C" { ...@@ -11,9 +10,11 @@ extern "C" {
#endif #endif
/* The following token may be returned by XmlContentTok */ /* The following token may be returned by XmlContentTok */
#define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be start of #define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be
illegal ]]> sequence */ start of illegal ]]> sequence */
/* The following tokens may be returned by both XmlPrologTok and XmlContentTok */ /* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_NONE -4 /* The string to be scanned is empty */ #define XML_TOK_NONE -4 /* The string to be scanned is empty */
#define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan; #define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan;
might be part of CRLF sequence */ might be part of CRLF sequence */
...@@ -22,8 +23,8 @@ extern "C" { ...@@ -22,8 +23,8 @@ extern "C" {
#define XML_TOK_INVALID 0 #define XML_TOK_INVALID 0
/* The following tokens are returned by XmlContentTok; some are also /* The following tokens are returned by XmlContentTok; some are also
returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok */ returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok.
*/
#define XML_TOK_START_TAG_WITH_ATTS 1 #define XML_TOK_START_TAG_WITH_ATTS 1
#define XML_TOK_START_TAG_NO_ATTS 2 #define XML_TOK_START_TAG_NO_ATTS 2
#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */ #define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
...@@ -35,7 +36,9 @@ extern "C" { ...@@ -35,7 +36,9 @@ extern "C" {
#define XML_TOK_ENTITY_REF 9 #define XML_TOK_ENTITY_REF 9
#define XML_TOK_CHAR_REF 10 /* numeric character reference */ #define XML_TOK_CHAR_REF 10 /* numeric character reference */
/* The following tokens may be returned by both XmlPrologTok and XmlContentTok */ /* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_PI 11 /* processing instruction */ #define XML_TOK_PI 11 /* processing instruction */
#define XML_TOK_XML_DECL 12 /* XML decl or text decl */ #define XML_TOK_XML_DECL 12 /* XML decl or text decl */
#define XML_TOK_COMMENT 13 #define XML_TOK_COMMENT 13
...@@ -75,8 +78,9 @@ extern "C" { ...@@ -75,8 +78,9 @@ extern "C" {
/* The following token is returned only by XmlCdataSectionTok */ /* The following token is returned only by XmlCdataSectionTok */
#define XML_TOK_CDATA_SECT_CLOSE 40 #define XML_TOK_CDATA_SECT_CLOSE 40
/* With namespace processing this is returned by XmlPrologTok /* With namespace processing this is returned by XmlPrologTok for a
for a name with a colon. */ name with a colon.
*/
#define XML_TOK_PREFIXED_NAME 41 #define XML_TOK_PREFIXED_NAME 41
#ifdef XML_DTD #ifdef XML_DTD
...@@ -121,37 +125,45 @@ typedef struct { ...@@ -121,37 +125,45 @@ typedef struct {
struct encoding; struct encoding;
typedef struct encoding ENCODING; typedef struct encoding ENCODING;
struct encoding { typedef int (PTRCALL *SCANNER)(const ENCODING *,
int (*scanners[XML_N_STATES])(const ENCODING *,
const char *, const char *,
const char *, const char *,
const char **); const char **);
int (*literalScanners[XML_N_LITERAL_TYPES])(const ENCODING *,
struct encoding {
SCANNER scanners[XML_N_STATES];
SCANNER literalScanners[XML_N_LITERAL_TYPES];
int (PTRCALL *sameName)(const ENCODING *,
const char *, const char *,
const char *);
int (PTRCALL *nameMatchesAscii)(const ENCODING *,
const char *, const char *,
const char **); const char *,
int (*sameName)(const ENCODING *, const char *);
const char *, const char *); int (PTRFASTCALL *nameLength)(const ENCODING *, const char *);
int (*nameMatchesAscii)(const ENCODING *, const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *);
const char *, const char *, const char *); int (PTRCALL *getAtts)(const ENCODING *enc,
int (*nameLength)(const ENCODING *, const char *); const char *ptr,
const char *(*skipS)(const ENCODING *, const char *); int attsMax,
int (*getAtts)(const ENCODING *enc, const char *ptr, ATTRIBUTE *atts);
int attsMax, ATTRIBUTE *atts); int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
int (*charRefNumber)(const ENCODING *enc, const char *ptr); int (PTRCALL *predefinedEntityName)(const ENCODING *,
int (*predefinedEntityName)(const ENCODING *, const char *, const char *); const char *,
void (*updatePosition)(const ENCODING *, const char *);
void (PTRCALL *updatePosition)(const ENCODING *,
const char *ptr, const char *ptr,
const char *end, const char *end,
POSITION *); POSITION *);
int (*isPublicId)(const ENCODING *enc, const char *ptr, const char *end, int (PTRCALL *isPublicId)(const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr); const char **badPtr);
void (*utf8Convert)(const ENCODING *enc, void (PTRCALL *utf8Convert)(const ENCODING *enc,
const char **fromP, const char **fromP,
const char *fromLim, const char *fromLim,
char **toP, char **toP,
const char *toLim); const char *toLim);
void (*utf16Convert)(const ENCODING *enc, void (PTRCALL *utf16Convert)(const ENCODING *enc,
const char **fromP, const char **fromP,
const char *fromLim, const char *fromLim,
unsigned short **toP, unsigned short **toP,
...@@ -161,24 +173,25 @@ struct encoding { ...@@ -161,24 +173,25 @@ struct encoding {
char isUtf16; char isUtf16;
}; };
/* /* Scan the string starting at ptr until the end of the next complete
Scan the string starting at ptr until the end of the next complete token, token, but do not scan past eptr. Return an integer giving the
but do not scan past eptr. Return an integer giving the type of token. type of token.
Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set. Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set.
Return XML_TOK_PARTIAL when the string does not contain a complete token; Return XML_TOK_PARTIAL when the string does not contain a complete
nextTokPtr will not be set. token; nextTokPtr will not be set.
Return XML_TOK_INVALID when the string does not start a valid token; nextTokPtr Return XML_TOK_INVALID when the string does not start a valid
will be set to point to the character which made the token invalid. token; nextTokPtr will be set to point to the character which made
the token invalid.
Otherwise the string starts with a valid token; nextTokPtr will be set to point Otherwise the string starts with a valid token; nextTokPtr will be
to the character following the end of that token. set to point to the character following the end of that token.
Each data character counts as a single token, but adjacent data characters Each data character counts as a single token, but adjacent data
may be returned together. Similarly for characters in the prolog outside characters may be returned together. Similarly for characters in
literals, comments and processing instructions. the prolog outside literals, comments and processing instructions.
*/ */
...@@ -201,9 +214,9 @@ literals, comments and processing instructions. ...@@ -201,9 +214,9 @@ literals, comments and processing instructions.
#endif /* XML_DTD */ #endif /* XML_DTD */
/* This is used for performing a 2nd-level tokenization on /* This is used for performing a 2nd-level tokenization on the content
the content of a literal that has already been returned by XmlTok. */ of a literal that has already been returned by XmlTok.
*/
#define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \ #define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \
(((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr)) (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
...@@ -264,14 +277,16 @@ int XmlParseXmlDecl(int isGeneralTextEntity, ...@@ -264,14 +277,16 @@ int XmlParseXmlDecl(int isGeneralTextEntity,
int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name); int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncoding(void); const ENCODING *XmlGetUtf8InternalEncoding(void);
const ENCODING *XmlGetUtf16InternalEncoding(void); const ENCODING *XmlGetUtf16InternalEncoding(void);
int XmlUtf8Encode(int charNumber, char *buf); int FASTCALL XmlUtf8Encode(int charNumber, char *buf);
int XmlUtf16Encode(int charNumber, unsigned short *buf); int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf);
int XmlSizeOfUnknownEncoding(void); int XmlSizeOfUnknownEncoding(void);
typedef int (*CONVERTER)(void *userData, const char *p);
ENCODING * ENCODING *
XmlInitUnknownEncoding(void *mem, XmlInitUnknownEncoding(void *mem,
int *table, int *table,
int (*conv)(void *userData, const char *p), CONVERTER convert,
void *userData); void *userData);
int XmlParseXmlDeclNS(int isGeneralTextEntity, int XmlParseXmlDeclNS(int isGeneralTextEntity,
...@@ -284,13 +299,14 @@ int XmlParseXmlDeclNS(int isGeneralTextEntity, ...@@ -284,13 +299,14 @@ int XmlParseXmlDeclNS(int isGeneralTextEntity,
const char **encodingNamePtr, const char **encodingNamePtr,
const ENCODING **namedEncodingPtr, const ENCODING **namedEncodingPtr,
int *standalonePtr); int *standalonePtr);
int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name); int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncodingNS(void); const ENCODING *XmlGetUtf8InternalEncodingNS(void);
const ENCODING *XmlGetUtf16InternalEncodingNS(void); const ENCODING *XmlGetUtf16InternalEncodingNS(void);
ENCODING * ENCODING *
XmlInitUnknownEncodingNS(void *mem, XmlInitUnknownEncodingNS(void *mem,
int *table, int *table,
int (*conv)(void *userData, const char *p), CONVERTER convert,
void *userData); void *userData);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
This diff is collapsed.
const ENCODING *NS(XmlGetUtf8InternalEncoding)(void) const ENCODING *
NS(XmlGetUtf8InternalEncoding)(void)
{ {
return &ns(internal_utf8_encoding).enc; return &ns(internal_utf8_encoding).enc;
} }
const ENCODING *NS(XmlGetUtf16InternalEncoding)(void) const ENCODING *
NS(XmlGetUtf16InternalEncoding)(void)
{ {
#if XML_BYTE_ORDER == 12 #if BYTEORDER == 1234
return &ns(internal_little2_encoding).enc; return &ns(internal_little2_encoding).enc;
#elif XML_BYTE_ORDER == 21 #elif BYTEORDER == 4321
return &ns(internal_big2_encoding).enc; return &ns(internal_big2_encoding).enc;
#else #else
const short n = 1; const short n = 1;
return *(const char *)&n ? &ns(internal_little2_encoding).enc : &ns(internal_big2_encoding).enc; return (*(const char *)&n
? &ns(internal_little2_encoding).enc
: &ns(internal_big2_encoding).enc);
#endif #endif
} }
static static const ENCODING *NS(encodings)[] = {
const ENCODING *NS(encodings)[] = {
&ns(latin1_encoding).enc, &ns(latin1_encoding).enc,
&ns(ascii_encoding).enc, &ns(ascii_encoding).enc,
&ns(utf8_encoding).enc, &ns(utf8_encoding).enc,
...@@ -26,21 +29,25 @@ const ENCODING *NS(encodings)[] = { ...@@ -26,21 +29,25 @@ const ENCODING *NS(encodings)[] = {
&ns(utf8_encoding).enc /* NO_ENC */ &ns(utf8_encoding).enc /* NO_ENC */
}; };
static static int PTRCALL
int NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end, NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr) const char **nextTokPtr)
{ {
return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_PROLOG_STATE, ptr, end, nextTokPtr); return initScan(NS(encodings), (const INIT_ENCODING *)enc,
XML_PROLOG_STATE, ptr, end, nextTokPtr);
} }
static static int PTRCALL
int NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end, NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr) const char **nextTokPtr)
{ {
return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_CONTENT_STATE, ptr, end, nextTokPtr); return initScan(NS(encodings), (const INIT_ENCODING *)enc,
XML_CONTENT_STATE, ptr, end, nextTokPtr);
} }
int NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr, const char *name) int
NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr,
const char *name)
{ {
int i = getEncodingIndex(name); int i = getEncodingIndex(name);
if (i == UNKNOWN_ENC) if (i == UNKNOWN_ENC)
...@@ -54,8 +61,8 @@ int NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr, const char *n ...@@ -54,8 +61,8 @@ int NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr, const char *n
return 1; return 1;
} }
static static const ENCODING *
const ENCODING *NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end) NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end)
{ {
#define ENCODING_MAX 128 #define ENCODING_MAX 128
char buf[ENCODING_MAX]; char buf[ENCODING_MAX];
...@@ -73,7 +80,8 @@ const ENCODING *NS(findEncoding)(const ENCODING *enc, const char *ptr, const cha ...@@ -73,7 +80,8 @@ const ENCODING *NS(findEncoding)(const ENCODING *enc, const char *ptr, const cha
return NS(encodings)[i]; return NS(encodings)[i];
} }
int NS(XmlParseXmlDecl)(int isGeneralTextEntity, int
NS(XmlParseXmlDecl)(int isGeneralTextEntity,
const ENCODING *enc, const ENCODING *enc,
const char *ptr, const char *ptr,
const char *end, const char *end,
......
...@@ -690,9 +690,9 @@ class PyBuildExt(build_ext): ...@@ -690,9 +690,9 @@ class PyBuildExt(build_ext):
# More information on Expat can be found at www.libexpat.org. # More information on Expat can be found at www.libexpat.org.
# #
if sys.byteorder == "little": if sys.byteorder == "little":
xmlbo = "12" xmlbo = "1234"
else: else:
xmlbo = "21" xmlbo = "4321"
expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat') expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
exts.append(Extension('pyexpat', exts.append(Extension('pyexpat',
sources = [ sources = [
...@@ -702,10 +702,9 @@ class PyBuildExt(build_ext): ...@@ -702,10 +702,9 @@ class PyBuildExt(build_ext):
'expat/xmltok.c', 'expat/xmltok.c',
], ],
define_macros = [ define_macros = [
('HAVE_EXPAT_H',None),
('XML_NS', '1'), ('XML_NS', '1'),
('XML_DTD', '1'), ('XML_DTD', '1'),
('XML_BYTE_ORDER', xmlbo), ('BYTEORDER', xmlbo),
('XML_CONTEXT_BYTES','1024'), ('XML_CONTEXT_BYTES','1024'),
], ],
include_dirs = [expatinc] include_dirs = [expatinc]
......
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