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

for Python 2.2.
This commit is contained in:
Jack Jansen 2002-11-18 15:26:43 +00:00
parent 5efbbcd793
commit 972573553e
9 changed files with 25 additions and 1 deletions

View file

@ -20,6 +20,9 @@
}} while(0)
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS
#include <MacHelp.h>
#else

View file

@ -36,6 +36,9 @@
#EventKind = Type("EventKind", "H")
includestuff = includestuff + """
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS
#include <MacHelp.h>
#else

View file

@ -20,6 +20,9 @@
}} while(0)
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS
#include <Resources.h>
#include <string.h>

View file

@ -25,6 +25,9 @@ class ResMethod(ResMixIn, OSErrWeakLinkMethodGenerator): pass
# includestuff etc. are imported from macsupport
includestuff = includestuff + """
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS
#include <Resources.h>
#include <string.h>

View file

@ -5,6 +5,9 @@
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef _WIN32
#include "pywintoolbox.h"
#else

View file

@ -26,6 +26,9 @@
ScrapRef = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
includestuff = includestuff + """
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
#ifdef WITHOUT_FRAMEWORKS
#include <Scrap.h>
#else

View file

@ -23,6 +23,9 @@
#include <WASTE.h>
#include <WEObjectHandlers.h>
#include <WETabs.h>
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
/* Exported by Qdmodule.c: */
extern PyObject *QdRGB_New(RGBColor *);

View file

@ -6,7 +6,7 @@
sys.path.append(BGENDIR)
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):
raise 'Error: not found: %s', WASTEDIR

View file

@ -63,6 +63,9 @@
#include <%s>""" % MACHEADERFILE + """
#include <WEObjectHandlers.h>
#include <WETabs.h>
#ifndef PyDoc_STR
#define PyDoc_STR(x) (x)
#endif
/* Exported by Qdmodule.c: */
extern PyObject *QdRGB_New(RGBColor *);