Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b760923

Browse files
committed
Got rid of 68k-Mac and other outdated ifdefs.
1 parent 71c5b02 commit b760923

5 files changed

Lines changed: 0 additions & 37 deletions

File tree

Mac/Include/pyconfig.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,12 +469,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
469469
#undef HAVE_HSTRERROR
470470

471471
/* Define if you have the hypot function. */
472-
#ifndef __MC68K__
473-
/* 68K hypot definition (and implementation) are unuseable
474-
** because they use 10-byte floats.
475-
*/
476472
#define HAVE_HYPOT
477-
#endif
478473

479474
/* Define if you have the inet_pton function. */
480475
#undef HAVE_INET_PTON

Mac/Modules/macspeechmodule.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4242
#include "pascal.h"
4343
#endif /* __MWERKS__ */
4444

45-
#ifdef __powerc
4645
#include <CodeFragments.h>
4746
int lib_available;
48-
#endif /* __powerc */
4947

5048
/* Somehow the Apple Fix2X and X2Fix don't do what I expect */
5149
#define fixed2double(x) (((double)(x))/32768.0)
@@ -60,9 +58,7 @@ init_available() {
6058
OSErr err;
6159
long result;
6260

63-
#ifdef __powerc
6461
lib_available = ((ProcPtr)SpeakString != (ProcPtr)0);
65-
#endif
6662
err = Gestalt(gestaltSpeechAttr, &result);
6763
if ( err == noErr && (result & (1<<gestaltSpeechMgrPresent)))
6864
return 1;
@@ -75,12 +71,10 @@ check_available() {
7571
PyErr_SetString(ms_error_object, "Speech Mgr not available");
7672
return 0;
7773
}
78-
#ifdef __powerc
7974
if ( !lib_available ) {
8075
PyErr_SetString(ms_error_object, "Speech Mgr available, but shared lib missing");
8176
return 0;
8277
}
83-
#endif
8478
return 1;
8579
}
8680

Mac/Python/macapplication.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2727
#include <Resources.h>
2828
#include <CodeFragments.h>
2929

30-
#ifdef __CFM68K__
31-
#pragma lib_export on
32-
#endif
33-
3430
extern void PyMac_InitApplication(void);
3531
#ifdef USE_MAC_APPLET_SUPPORT
3632
extern void PyMac_InitApplet(void);

Mac/Python/macglue.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4646
#include <Menus.h>
4747
#include <TextUtils.h>
4848
#include <LowMem.h>
49-
#ifdef __CFM68K__
50-
/* cfm68k InterfaceLib exports GetEventQueue, but Events.h doesn't know this
51-
** and defines it as GetEvQHdr (which is correct for PPC). This fix is for
52-
** CW9, check that the workaround is still needed for the next release.
53-
*/
54-
#define GetEvQHdr GetEventQueue
55-
#endif /* __CFM68K__ */
56-
5749
#include <Events.h>
58-
59-
#ifdef __CFM68K__
60-
#undef GetEventQueue
61-
#endif /* __CFM68K__ */
6250
#else
6351
#include <Carbon/Carbon.h>
6452
#endif
@@ -99,11 +87,7 @@ extern pascal unsigned char *PLstrrchr(unsigned char *, unsigned char);
9987
** raise a MemoryError.
10088
*/
10189
#ifndef MINIMUM_STACK_SIZE
102-
#ifdef __powerc
10390
#define MINIMUM_STACK_SIZE 8192
104-
#else
105-
#define MINIMUM_STACK_SIZE 4096
106-
#endif
10791
#endif
10892

10993
#if TARGET_API_MAC_CARBON

Mac/Python/macimport.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,9 @@ findnamedresource(
145145
if ( ok && dataptr != NULL ) {
146146
HLock(h);
147147
/* XXXX Unsafe if resource not correctly formatted! */
148-
#ifdef __CFM68K__
149-
/* for cfm68k we take the second pstring */
150-
*dataptr = *((*h)+(**h)+1);
151-
memcpy(dataptr+1, (*h)+(**h)+2, (int)*dataptr);
152-
#else
153148
/* for ppc we take the first pstring */
154149
*dataptr = **h;
155150
memcpy(dataptr+1, (*h)+1, (int)*dataptr);
156-
#endif
157151
HUnlock(h);
158152
}
159153
if ( filerh != -1 )

0 commit comments

Comments
 (0)