Commit 97257355 authored by Jack Jansen's avatar Jack Jansen

Define PyDoc_STR if it isn't defined. This makes these modules compile

for Python 2.2.
parent 5efbbcd7
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
}} while(0) }} while(0)
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS #ifdef WITHOUT_FRAMEWORKS
#include <MacHelp.h> #include <MacHelp.h>
#else #else
......
...@@ -36,6 +36,9 @@ MenuItemIndex = Type("MenuItemIndex", "H") ...@@ -36,6 +36,9 @@ MenuItemIndex = Type("MenuItemIndex", "H")
#EventKind = Type("EventKind", "H") #EventKind = Type("EventKind", "H")
includestuff = includestuff + """ includestuff = includestuff + """
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS #ifdef WITHOUT_FRAMEWORKS
#include <MacHelp.h> #include <MacHelp.h>
#else #else
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
}} while(0) }} while(0)
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS #ifdef WITHOUT_FRAMEWORKS
#include <Resources.h> #include <Resources.h>
#include <string.h> #include <string.h>
......
...@@ -25,6 +25,9 @@ FSCatalogInfo_ptr = FakeType("(FSCatalogInfo *)0") ...@@ -25,6 +25,9 @@ FSCatalogInfo_ptr = FakeType("(FSCatalogInfo *)0")
# includestuff etc. are imported from macsupport # includestuff etc. are imported from macsupport
includestuff = includestuff + """ includestuff = includestuff + """
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS #ifdef WITHOUT_FRAMEWORKS
#include <Resources.h> #include <Resources.h>
#include <string.h> #include <string.h>
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef _WIN32 #ifdef _WIN32
#include "pywintoolbox.h" #include "pywintoolbox.h"
#else #else
......
...@@ -26,6 +26,9 @@ from macsupport import * ...@@ -26,6 +26,9 @@ from macsupport import *
ScrapRef = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX) ScrapRef = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
includestuff = includestuff + """ includestuff = includestuff + """
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS #ifdef WITHOUT_FRAMEWORKS
#include <Scrap.h> #include <Scrap.h>
#else #else
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
#include <WASTE.h> #include <WASTE.h>
#include <WEObjectHandlers.h> #include <WEObjectHandlers.h>
#include <WETabs.h> #include <WETabs.h>
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
/* Exported by Qdmodule.c: */ /* Exported by Qdmodule.c: */
extern PyObject *QdRGB_New(RGBColor *); extern PyObject *QdRGB_New(RGBColor *);
......
...@@ -6,7 +6,7 @@ from bgenlocations import TOOLBOXDIR, BGENDIR ...@@ -6,7 +6,7 @@ from bgenlocations import TOOLBOXDIR, BGENDIR
sys.path.append(BGENDIR) sys.path.append(BGENDIR)
from scantools import Scanner from scantools import Scanner
WASTEDIR='/Applications/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/MacOS Support/(Third Party Support)/Waste 2.0 Distribution/C_C++ Headers/' 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/'
if not os.path.exists(WASTEDIR): if not os.path.exists(WASTEDIR):
raise 'Error: not found: %s', WASTEDIR raise 'Error: not found: %s', WASTEDIR
......
...@@ -63,6 +63,9 @@ includestuff = includestuff + """ ...@@ -63,6 +63,9 @@ includestuff = includestuff + """
#include <%s>""" % MACHEADERFILE + """ #include <%s>""" % MACHEADERFILE + """
#include <WEObjectHandlers.h> #include <WEObjectHandlers.h>
#include <WETabs.h> #include <WETabs.h>
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
/* Exported by Qdmodule.c: */ /* Exported by Qdmodule.c: */
extern PyObject *QdRGB_New(RGBColor *); extern PyObject *QdRGB_New(RGBColor *);
......
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