mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Define PyDoc_STR if it isn't defined. This makes these modules compile
for Python 2.2.
This commit is contained in:
parent
5efbbcd793
commit
972573553e
9 changed files with 25 additions and 1 deletions
|
|
@ -20,6 +20,9 @@
|
|||
}} while(0)
|
||||
|
||||
|
||||
#ifndef PyDoc_STR
|
||||
#define PyDoc_STR(x) (x)
|
||||
#endif
|
||||
#ifdef WITHOUT_FRAMEWORKS
|
||||
#include <MacHelp.h>
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
}} while(0)
|
||||
|
||||
|
||||
#ifndef PyDoc_STR
|
||||
#define PyDoc_STR(x) (x)
|
||||
#endif
|
||||
#ifdef WITHOUT_FRAMEWORKS
|
||||
#include <Resources.h>
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@
|
|||
|
||||
|
||||
|
||||
#ifndef PyDoc_STR
|
||||
#define PyDoc_STR(x) (x)
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#include "pywintoolbox.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 *);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue