Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
a239a92e
Kaydet (Commit)
a239a92e
authored
Nis 15, 1998
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reindented some of the C code
üst
df3c6ab4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
40 deletions
+46
-40
Sndmodule.c
Mac/Modules/snd/Sndmodule.c
+23
-20
sndsupport.py
Mac/Modules/snd/sndsupport.py
+23
-20
No files found.
Mac/Modules/snd/Sndmodule.c
Dosyayı görüntüle @
a239a92e
...
@@ -398,26 +398,29 @@ static int SPBObj_setattr(self, name, value)
...
@@ -398,26 +398,29 @@ static int SPBObj_setattr(self, name, value)
PyObject
*
value
;
PyObject
*
value
;
{
{
if
(
strcmp
(
name
,
"inRefNum"
)
==
0
)
int
rv
=
0
;
return
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
inRefNum
);
else
if
(
strcmp
(
name
,
"count"
)
==
0
)
if
(
strcmp
(
name
,
"inRefNum"
)
==
0
)
return
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
count
);
rv
=
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
inRefNum
);
else
if
(
strcmp
(
name
,
"milliseconds"
)
==
0
)
else
if
(
strcmp
(
name
,
"count"
)
==
0
)
return
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
milliseconds
);
rv
=
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
count
);
else
if
(
strcmp
(
name
,
"buffer"
)
==
0
)
else
if
(
strcmp
(
name
,
"milliseconds"
)
==
0
)
return
PyArg_Parse
(
value
,
"w#"
,
&
self
->
ob_spb
.
bufferPtr
,
&
self
->
ob_spb
.
bufferLength
);
rv
=
PyArg_Parse
(
value
,
"l"
,
&
self
->
ob_spb
.
milliseconds
);
else
if
(
strcmp
(
name
,
"completionRoutine"
)
==
0
)
{
else
if
(
strcmp
(
name
,
"buffer"
)
==
0
)
self
->
ob_spb
.
completionRoutine
=
NewSICompletionProc
(
SPB_completion
);
rv
=
PyArg_Parse
(
value
,
"w#"
,
&
self
->
ob_spb
.
bufferPtr
,
&
self
->
ob_spb
.
bufferLength
);
self
->
ob_completion
=
value
;
else
if
(
strcmp
(
name
,
"completionRoutine"
)
==
0
)
{
Py_INCREF
(
value
);
self
->
ob_spb
.
completionRoutine
=
NewSICompletionProc
(
SPB_completion
);
return
0
;
self
->
ob_completion
=
value
;
}
else
if
(
strcmp
(
name
,
"interruptRoutine"
)
==
0
)
{
Py_INCREF
(
value
);
self
->
ob_spb
.
completionRoutine
=
NewSIInterruptProc
(
SPB_interrupt
);
rv
=
1
;
self
->
ob_interrupt
=
value
;
}
else
if
(
strcmp
(
name
,
"interruptRoutine"
)
==
0
)
{
Py_INCREF
(
value
);
self
->
ob_spb
.
completionRoutine
=
NewSIInterruptProc
(
SPB_interrupt
);
return
0
;
self
->
ob_interrupt
=
value
;
}
Py_INCREF
(
value
);
return
-
1
;
rv
=
1
;
}
if
(
rv
)
return
0
;
else
return
-
1
;
}
}
staticforward
PyTypeObject
SPB_Type
=
{
staticforward
PyTypeObject
SPB_Type
=
{
...
...
Mac/Modules/snd/sndsupport.py
Dosyayı görüntüle @
a239a92e
...
@@ -303,26 +303,29 @@ class SpbObjectDefinition(ObjectDefinition):
...
@@ -303,26 +303,29 @@ class SpbObjectDefinition(ObjectDefinition):
def
outputSetattrBody
(
self
):
def
outputSetattrBody
(
self
):
Output
(
"""
Output
(
"""
if (strcmp(name, "inRefNum") == 0)
int rv = 0;
return PyArg_Parse(value, "l", &self->ob_spb.inRefNum);
else if (strcmp(name, "count") == 0)
if (strcmp(name, "inRefNum") == 0)
return PyArg_Parse(value, "l", &self->ob_spb.count);
rv = PyArg_Parse(value, "l", &self->ob_spb.inRefNum);
else if (strcmp(name, "milliseconds") == 0)
else if (strcmp(name, "count") == 0)
return PyArg_Parse(value, "l", &self->ob_spb.milliseconds);
rv = PyArg_Parse(value, "l", &self->ob_spb.count);
else if (strcmp(name, "buffer") == 0)
else if (strcmp(name, "milliseconds") == 0)
return PyArg_Parse(value, "w#", &self->ob_spb.bufferPtr, &self->ob_spb.bufferLength);
rv = PyArg_Parse(value, "l", &self->ob_spb.milliseconds);
else if (strcmp(name, "completionRoutine") == 0) {
else if (strcmp(name, "buffer") == 0)
self->ob_spb.completionRoutine = NewSICompletionProc(SPB_completion);
rv = PyArg_Parse(value, "w#", &self->ob_spb.bufferPtr, &self->ob_spb.bufferLength);
self->ob_completion = value;
else if (strcmp(name, "completionRoutine") == 0) {
Py_INCREF(value);
self->ob_spb.completionRoutine = NewSICompletionProc(SPB_completion);
return 0;
self->ob_completion = value;
} else if (strcmp(name, "interruptRoutine") == 0) {
Py_INCREF(value);
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
rv = 1;
self->ob_interrupt = value;
} else if (strcmp(name, "interruptRoutine") == 0) {
Py_INCREF(value);
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
return 0;
self->ob_interrupt = value;
}
Py_INCREF(value);
return -1;"""
)
rv = 1;
}
if ( rv ) return 0;
else return -1;"""
)
def
outputGetattrHook
(
self
):
def
outputGetattrHook
(
self
):
Output
(
"""
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