Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fb276566
Commit
fb276566
authored
Nov 19, 2003
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting rid of support for the ancient Apple MPW compiler.
parent
61963220
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
0 additions
and
80 deletions
+0
-80
Mac/Modules/macosmodule.c
Mac/Modules/macosmodule.c
+0
-5
Modules/main.c
Modules/main.c
+0
-7
Modules/mathmodule.c
Modules/mathmodule.c
+0
-13
Objects/object.c
Objects/object.c
+0
-8
Parser/acceler.c
Parser/acceler.c
+0
-17
Parser/myreadline.c
Parser/myreadline.c
+0
-7
Python/modsupport.c
Python/modsupport.c
+0
-4
Python/mystrtoul.c
Python/mystrtoul.c
+0
-2
Python/pythonrun.c
Python/pythonrun.c
+0
-12
Python/traceback.c
Python/traceback.c
+0
-5
No files found.
Mac/Modules/macosmodule.c
View file @
fb276566
...
...
@@ -47,10 +47,6 @@ static PyObject *MacOS_Error; /* Exception MacOS.Error */
#define PATHNAMELEN 256
#endif
#ifdef MPW
#define bufferIsSmall -607
/*error returns from Post and Accept */
#endif
/* ----------------------------------------------------- */
/* Declarations for objects of type Resource fork */
...
...
@@ -778,4 +774,3 @@ initMacOS(void)
return
;
}
Modules/main.c
View file @
fb276566
...
...
@@ -327,7 +327,6 @@ Py_Main(int argc, char **argv)
_setmode
(
fileno
(
stdin
),
O_BINARY
);
_setmode
(
fileno
(
stdout
),
O_BINARY
);
#endif
#ifndef MPW
#ifdef HAVE_SETVBUF
setvbuf
(
stdin
,
(
char
*
)
NULL
,
_IONBF
,
BUFSIZ
);
setvbuf
(
stdout
,
(
char
*
)
NULL
,
_IONBF
,
BUFSIZ
);
...
...
@@ -337,12 +336,6 @@ Py_Main(int argc, char **argv)
setbuf
(
stdout
,
(
char
*
)
NULL
);
setbuf
(
stderr
,
(
char
*
)
NULL
);
#endif
/* !HAVE_SETVBUF */
#else
/* MPW */
/* On MPW (3.2) unbuffered seems to hang */
setvbuf
(
stdin
,
(
char
*
)
NULL
,
_IOLBF
,
BUFSIZ
);
setvbuf
(
stdout
,
(
char
*
)
NULL
,
_IOLBF
,
BUFSIZ
);
setvbuf
(
stderr
,
(
char
*
)
NULL
,
_IOLBF
,
BUFSIZ
);
#endif
/* MPW */
}
else
if
(
Py_InteractiveFlag
)
{
#ifdef MS_WINDOWS
...
...
Modules/mathmodule.c
View file @
fb276566
...
...
@@ -121,13 +121,8 @@ FUNC2(fmod, fmod,
" x % y may differ."
)
FUNC2
(
hypot
,
hypot
,
"hypot(x,y)
\n\n
Return the Euclidean distance, sqrt(x*x + y*y)."
)
#ifdef MPW_3_1
/* This hack is needed for MPW 3.1 but not for 3.2 ... */
FUNC2
(
pow
,
power
,
"pow(x,y)
\n\n
Return x**y (x to the power of y)."
)
#else
FUNC2
(
pow
,
pow
,
"pow(x,y)
\n\n
Return x**y (x to the power of y)."
)
#endif
FUNC1
(
sin
,
sin
,
"sin(x)
\n\n
Return the sine of x (measured in radians)."
)
FUNC1
(
sinh
,
sinh
,
...
...
@@ -190,15 +185,7 @@ math_modf(PyObject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"d:modf"
,
&
x
))
return
NULL
;
errno
=
0
;
#ifdef MPW
/* MPW C modf expects pointer to extended as second argument */
{
extended
e
;
x
=
modf
(
x
,
&
e
);
y
=
e
;
}
#else
x
=
modf
(
x
,
&
y
);
#endif
Py_SET_ERANGE_IF_OVERFLOW
(
x
);
if
(
errno
&&
is_error
(
x
))
return
NULL
;
...
...
Objects/object.c
View file @
fb276566
...
...
@@ -908,15 +908,7 @@ _Py_HashDouble(double v)
* of mapping keys will turn out weird.
*/
#ifdef MPW
/* MPW C modf expects pointer to extended as second argument */
{
extended
e
;
fractpart
=
modf
(
v
,
&
e
);
intpart
=
e
;
}
#else
fractpart
=
modf
(
v
,
&
intpart
);
#endif
if
(
fractpart
==
0
.
0
)
{
/* This must return the same hash as an equal int or long. */
if
(
intpart
>
LONG_MAX
||
-
intpart
>
LONG_MAX
)
{
...
...
Parser/acceler.c
View file @
fb276566
...
...
@@ -89,27 +89,10 @@ fixstate(grammar *g, state *s)
}
for
(
ibit
=
0
;
ibit
<
g
->
g_ll
.
ll_nlabels
;
ibit
++
)
{
if
(
testbit
(
d1
->
d_first
,
ibit
))
{
#ifdef applec
#define MPW_881_BUG
/* Undefine if bug below is fixed */
#endif
#ifdef MPW_881_BUG
/* In 881 mode MPW 3.1 has a code
generation bug which seems to
set the upper bits; fix this by
explicitly masking them off */
int
temp
;
#endif
if
(
accel
[
ibit
]
!=
-
1
)
printf
(
"XXX ambiguity!
\n
"
);
#ifdef MPW_881_BUG
temp
=
0xFFFF
&
(
a
->
a_arrow
|
(
1
<<
7
)
|
((
type
-
NT_OFFSET
)
<<
8
));
accel
[
ibit
]
=
temp
;
#else
accel
[
ibit
]
=
a
->
a_arrow
|
(
1
<<
7
)
|
((
type
-
NT_OFFSET
)
<<
8
);
#endif
}
}
}
...
...
Parser/myreadline.c
View file @
fb276566
...
...
@@ -123,13 +123,6 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
*
p
=
'\0'
;
break
;
}
#ifdef MPW
/* Hack for MPW C where the prompt comes right back in the input */
/* XXX (Actually this would be rather nice on most systems...) */
n
=
strlen
(
prompt
);
if
(
strncmp
(
p
,
prompt
,
n
)
==
0
)
memmove
(
p
,
p
+
n
,
strlen
(
p
)
-
n
+
1
);
#endif
n
=
strlen
(
p
);
while
(
n
>
0
&&
p
[
n
-
1
]
!=
'\n'
)
{
size_t
incr
=
n
+
2
;
...
...
Python/modsupport.c
View file @
fb276566
...
...
@@ -3,11 +3,7 @@
#include "Python.h"
#ifdef MPW
/* MPW pushes 'extended' for float and double types with varargs */
typedef
extended
va_double
;
#else
typedef
double
va_double
;
#endif
/* Package context -- the full module name for package imports */
char
*
_Py_PackageContext
=
NULL
;
...
...
Python/mystrtoul.c
View file @
fb276566
...
...
@@ -100,7 +100,6 @@ PyOS_strtoul(register char *str, char **ptr, int base)
}
temp
=
result
;
result
=
result
*
base
+
c
;
#ifndef MPW
if
(
base
==
10
)
{
if
(((
long
)(
result
-
c
)
/
base
!=
(
long
)
temp
))
/* overflow */
ovf
=
1
;
...
...
@@ -109,7 +108,6 @@ PyOS_strtoul(register char *str, char **ptr, int base)
if
((
result
-
c
)
/
base
!=
temp
)
/* overflow */
ovf
=
1
;
}
#endif
str
++
;
}
...
...
Python/pythonrun.c
View file @
fb276566
...
...
@@ -1566,18 +1566,6 @@ initsigs(void)
PyOS_InitInterrupts
();
/* May imply initsignal() */
}
#ifdef MPW
/* Check for file descriptor connected to interactive device.
Pretend that stdin is always interactive, other files never. */
int
isatty
(
int
fd
)
{
return
fd
==
fileno
(
stdin
);
}
#endif
/*
* The file descriptor fd is considered ``interactive'' if either
...
...
Python/traceback.c
View file @
fb276566
...
...
@@ -147,13 +147,8 @@ tb_displayline(PyObject *f, char *filename, int lineno, char *name)
int
i
;
if
(
filename
==
NULL
||
name
==
NULL
)
return
-
1
;
#ifdef MPW
/* This is needed by MPW's File and Line commands */
#define FMT " File \"%.500s\"; line %d # in %.500s\n"
#else
/* This is needed by Emacs' compile command */
#define FMT " File \"%.500s\", line %d, in %.500s\n"
#endif
xfp
=
fopen
(
filename
,
"r"
PY_STDIOTEXTMODE
);
if
(
xfp
==
NULL
)
{
/* Search tail of filename in sys.path before giving up */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment