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
2273d7e7
Commit
2273d7e7
authored
Apr 15, 1998
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reindented some of the C code
parent
5cd7d9de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
40 deletions
+46
-40
Mac/Modules/snd/Sndmodule.c
Mac/Modules/snd/Sndmodule.c
+23
-20
Mac/Modules/snd/sndsupport.py
Mac/Modules/snd/sndsupport.py
+23
-20
No files found.
Mac/Modules/snd/Sndmodule.c
View file @
2273d7e7
...
...
@@ -398,26 +398,29 @@ static int SPBObj_setattr(self, name, value)
PyObject
*
value
;
{
if
(
strcmp
(
name
,
"inRefNum"
)
==
0
)
return
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
inRefNum
);
else
if
(
strcmp
(
name
,
"count"
)
==
0
)
return
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
count
);
else
if
(
strcmp
(
name
,
"milliseconds"
)
==
0
)
return
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
milliseconds
);
else
if
(
strcmp
(
name
,
"buffer"
)
==
0
)
return
PyArg_Parse
(
value
,
"w#"
,
&
self
->
ob_spb
.
bufferPtr
,
&
self
->
ob_spb
.
bufferLength
);
else
if
(
strcmp
(
name
,
"completionRoutine"
)
==
0
)
{
self
->
ob_spb
.
completionRoutine
=
NewSICompletionProc
(
SPB_completion
);
self
->
ob_completion
=
value
;
Py_INCREF
(
value
);
return
0
;
}
else
if
(
strcmp
(
name
,
"interruptRoutine"
)
==
0
)
{
self
->
ob_spb
.
completionRoutine
=
NewSIInterruptProc
(
SPB_interrupt
);
self
->
ob_interrupt
=
value
;
Py_INCREF
(
value
);
return
0
;
}
return
-
1
;
int
rv
=
0
;
if
(
strcmp
(
name
,
"inRefNum"
)
==
0
)
rv
=
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
inRefNum
);
else
if
(
strcmp
(
name
,
"count"
)
==
0
)
rv
=
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
count
);
else
if
(
strcmp
(
name
,
"milliseconds"
)
==
0
)
rv
=
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
milliseconds
);
else
if
(
strcmp
(
name
,
"buffer"
)
==
0
)
rv
=
PyArg_Parse
(
value
,
"w#"
,
&
self
->
ob_spb
.
bufferPtr
,
&
self
->
ob_spb
.
bufferLength
);
else
if
(
strcmp
(
name
,
"completionRoutine"
)
==
0
)
{
self
->
ob_spb
.
completionRoutine
=
NewSICompletionProc
(
SPB_completion
);
self
->
ob_completion
=
value
;
Py_INCREF
(
value
);
rv
=
1
;
}
else
if
(
strcmp
(
name
,
"interruptRoutine"
)
==
0
)
{
self
->
ob_spb
.
completionRoutine
=
NewSIInterruptProc
(
SPB_interrupt
);
self
->
ob_interrupt
=
value
;
Py_INCREF
(
value
);
rv
=
1
;
}
if
(
rv
)
return
0
;
else
return
-
1
;
}
staticforward
PyTypeObject
SPB_Type
=
{
...
...
Mac/Modules/snd/sndsupport.py
View file @
2273d7e7
...
...
@@ -303,26 +303,29 @@ class SpbObjectDefinition(ObjectDefinition):
def
outputSetattrBody
(
self
):
Output
(
"""
if (strcmp(name, "inRefNum") == 0)
return PyArg_Parse(value, "l", &self->ob_spb.inRefNum);
else if (strcmp(name, "count") == 0)
return PyArg_Parse(value, "l", &self->ob_spb.count);
else if (strcmp(name, "milliseconds") == 0)
return PyArg_Parse(value, "l", &self->ob_spb.milliseconds);
else if (strcmp(name, "buffer") == 0)
return PyArg_Parse(value, "w#", &self->ob_spb.bufferPtr, &self->ob_spb.bufferLength);
else if (strcmp(name, "completionRoutine") == 0) {
self->ob_spb.completionRoutine = NewSICompletionProc(SPB_completion);
self->ob_completion = value;
Py_INCREF(value);
return 0;
} else if (strcmp(name, "interruptRoutine") == 0) {
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
self->ob_interrupt = value;
Py_INCREF(value);
return 0;
}
return -1;"""
)
int rv = 0;
if (strcmp(name, "inRefNum") == 0)
rv = PyArg_Parse(value, "l", &self->ob_spb.inRefNum);
else if (strcmp(name, "count") == 0)
rv = PyArg_Parse(value, "l", &self->ob_spb.count);
else if (strcmp(name, "milliseconds") == 0)
rv = PyArg_Parse(value, "l", &self->ob_spb.milliseconds);
else if (strcmp(name, "buffer") == 0)
rv = PyArg_Parse(value, "w#", &self->ob_spb.bufferPtr, &self->ob_spb.bufferLength);
else if (strcmp(name, "completionRoutine") == 0) {
self->ob_spb.completionRoutine = NewSICompletionProc(SPB_completion);
self->ob_completion = value;
Py_INCREF(value);
rv = 1;
} else if (strcmp(name, "interruptRoutine") == 0) {
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
self->ob_interrupt = value;
Py_INCREF(value);
rv = 1;
}
if ( rv ) return 0;
else return -1;"""
)
def
outputGetattrHook
(
self
):
Output
(
"""
...
...
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