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
f5c20575
Commit
f5c20575
authored
Jan 30, 1997
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed
parent
22023f4b
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
617 additions
and
621 deletions
+617
-621
Mac/Modules/ctbmodule.c
Mac/Modules/ctbmodule.c
+137
-137
Mac/Modules/gestaltmodule.c
Mac/Modules/gestaltmodule.c
+10
-11
Mac/Modules/macfsmodule.c
Mac/Modules/macfsmodule.c
+171
-172
Mac/Modules/macmodule.c
Mac/Modules/macmodule.c
+184
-185
Mac/Modules/macspeechmodule.c
Mac/Modules/macspeechmodule.c
+115
-116
No files found.
Mac/Modules/ctbmodule.c
View file @
f5c20575
This diff is collapsed.
Click to expand it.
Mac/Modules/gestaltmodule.c
View file @
f5c20575
...
...
@@ -24,26 +24,25 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Macintosh Gestalt interface */
#include "allobjects.h"
#include "modsupport.h"
#include "Python.h"
#include <Types.h>
#include <GestaltEqu.h>
static
o
bject
*
static
PyO
bject
*
gestalt_gestalt
(
self
,
args
)
o
bject
*
self
;
o
bject
*
args
;
PyO
bject
*
self
;
PyO
bject
*
args
;
{
OSErr
iErr
;
char
*
str
;
int
size
;
OSType
selector
;
long
response
;
if
(
!
getargs
(
args
,
"s#"
,
&
str
,
&
size
))
if
(
!
PyArg_Parse
(
args
,
"s#"
,
&
str
,
&
size
))
return
NULL
;
if
(
size
!=
4
)
{
err_setstr
(
TypeError
,
"gestalt arg must be 4-char string"
);
PyErr_SetString
(
PyExc_
TypeError
,
"gestalt arg must be 4-char string"
);
return
NULL
;
}
selector
=
*
(
OSType
*
)
str
;
...
...
@@ -51,13 +50,13 @@ gestalt_gestalt(self, args)
if
(
iErr
!=
0
)
{
char
buf
[
100
];
sprintf
(
buf
,
"Gestalt error code %d"
,
iErr
);
err_setstr
(
RuntimeError
,
buf
);
PyErr_SetString
(
PyExc_
RuntimeError
,
buf
);
return
NULL
;
}
return
newintobject
(
response
);
return
PyInt_FromLong
(
response
);
}
static
struct
methodlist
gestalt_methods
[]
=
{
static
struct
PyMethodDef
gestalt_methods
[]
=
{
{
"gestalt"
,
gestalt_gestalt
},
{
NULL
,
NULL
}
/* Sentinel */
};
...
...
@@ -65,5 +64,5 @@ static struct methodlist gestalt_methods[] = {
void
initgestalt
()
{
initm
odule
(
"gestalt"
,
gestalt_methods
);
Py_InitM
odule
(
"gestalt"
,
gestalt_methods
);
}
Mac/Modules/macfsmodule.c
View file @
f5c20575
This diff is collapsed.
Click to expand it.
Mac/Modules/macmodule.c
View file @
f5c20575
This diff is collapsed.
Click to expand it.
Mac/Modules/macspeechmodule.c
View file @
f5c20575
This diff is collapsed.
Click to expand it.
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