Skip to content

Commit e8200ca

Browse files
author
jackjansen
committed
Define PyDoc_STR if it isn't defined. This makes these modules compile
for Python 2.2. git-svn-id: http://svn.python.org/projects/python/trunk@29745 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 89fb45d commit e8200ca

9 files changed

Lines changed: 25 additions & 1 deletion

File tree

Mac/Modules/help/_Helpmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
}} while(0)
2121

2222

23+
#ifndef PyDoc_STR
24+
#define PyDoc_STR(x) (x)
25+
#endif
2326
#ifdef WITHOUT_FRAMEWORKS
2427
#include <MacHelp.h>
2528
#else

Mac/Modules/help/helpsupport.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
#EventKind = Type("EventKind", "H")
3737

3838
includestuff = includestuff + """
39+
#ifndef PyDoc_STR
40+
#define PyDoc_STR(x) (x)
41+
#endif
3942
#ifdef WITHOUT_FRAMEWORKS
4043
#include <MacHelp.h>
4144
#else

Mac/Modules/res/_Resmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
}} while(0)
2121

2222

23+
#ifndef PyDoc_STR
24+
#define PyDoc_STR(x) (x)
25+
#endif
2326
#ifdef WITHOUT_FRAMEWORKS
2427
#include <Resources.h>
2528
#include <string.h>

Mac/Modules/res/ressupport.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class ResMethod(ResMixIn, OSErrWeakLinkMethodGenerator): pass
2525
# includestuff etc. are imported from macsupport
2626

2727
includestuff = includestuff + """
28+
#ifndef PyDoc_STR
29+
#define PyDoc_STR(x) (x)
30+
#endif
2831
#ifdef WITHOUT_FRAMEWORKS
2932
#include <Resources.h>
3033
#include <string.h>

Mac/Modules/scrap/_Scrapmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66

77

8+
#ifndef PyDoc_STR
9+
#define PyDoc_STR(x) (x)
10+
#endif
811
#ifdef _WIN32
912
#include "pywintoolbox.h"
1013
#else

Mac/Modules/scrap/scrapsupport.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
ScrapRef = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
2727

2828
includestuff = includestuff + """
29+
#ifndef PyDoc_STR
30+
#define PyDoc_STR(x) (x)
31+
#endif
2932
#ifdef WITHOUT_FRAMEWORKS
3033
#include <Scrap.h>
3134
#else

Mac/Modules/waste/wastemodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#include <WASTE.h>
2424
#include <WEObjectHandlers.h>
2525
#include <WETabs.h>
26+
#ifndef PyDoc_STR
27+
#define PyDoc_STR(x) (x)
28+
#endif
2629

2730
/* Exported by Qdmodule.c: */
2831
extern PyObject *QdRGB_New(RGBColor *);

Mac/Modules/waste/wastescan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
sys.path.append(BGENDIR)
77
from scantools import Scanner
88

9-
WASTEDIR='/Applications/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/MacOS Support/(Third Party Support)/Waste 2.0 Distribution/C_C++ Headers/'
9+
WASTEDIR='/Volumes/Moes/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/MacOS Support/(Third Party Support)/Waste 2.0 Distribution/C_C++ Headers/'
1010

1111
if not os.path.exists(WASTEDIR):
1212
raise 'Error: not found: %s', WASTEDIR

Mac/Modules/waste/wastesupport.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
#include <%s>""" % MACHEADERFILE + """
6464
#include <WEObjectHandlers.h>
6565
#include <WETabs.h>
66+
#ifndef PyDoc_STR
67+
#define PyDoc_STR(x) (x)
68+
#endif
6669
6770
/* Exported by Qdmodule.c: */
6871
extern PyObject *QdRGB_New(RGBColor *);

0 commit comments

Comments
 (0)