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
8abd2e6c
Kaydet (Commit)
8abd2e6c
authored
Agu 26, 2007
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use unicode
üst
3fcbea56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
ossaudiodev.c
Modules/ossaudiodev.c
+11
-11
No files found.
Modules/ossaudiodev.c
Dosyayı görüntüle @
8abd2e6c
...
@@ -366,10 +366,10 @@ oss_read(oss_audio_t *self, PyObject *args)
...
@@ -366,10 +366,10 @@ oss_read(oss_audio_t *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"i:read"
,
&
size
))
if
(
!
PyArg_ParseTuple
(
args
,
"i:read"
,
&
size
))
return
NULL
;
return
NULL
;
rv
=
Py
String
_FromStringAndSize
(
NULL
,
size
);
rv
=
Py
Bytes
_FromStringAndSize
(
NULL
,
size
);
if
(
rv
==
NULL
)
if
(
rv
==
NULL
)
return
NULL
;
return
NULL
;
cp
=
Py
String
_AS_STRING
(
rv
);
cp
=
Py
Bytes
_AS_STRING
(
rv
);
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
count
=
read
(
self
->
fd
,
cp
,
size
);
count
=
read
(
self
->
fd
,
cp
,
size
);
...
@@ -381,7 +381,7 @@ oss_read(oss_audio_t *self, PyObject *args)
...
@@ -381,7 +381,7 @@ oss_read(oss_audio_t *self, PyObject *args)
return
NULL
;
return
NULL
;
}
}
self
->
icount
+=
count
;
self
->
icount
+=
count
;
_PyString_Resize
(
&
rv
,
count
);
PyBytes_Resize
(
rv
,
count
);
return
rv
;
return
rv
;
}
}
...
@@ -391,7 +391,7 @@ oss_write(oss_audio_t *self, PyObject *args)
...
@@ -391,7 +391,7 @@ oss_write(oss_audio_t *self, PyObject *args)
char
*
cp
;
char
*
cp
;
int
rv
,
size
;
int
rv
,
size
;
if
(
!
PyArg_ParseTuple
(
args
,
"
s
#:write"
,
&
cp
,
&
size
))
{
if
(
!
PyArg_ParseTuple
(
args
,
"
y
#:write"
,
&
cp
,
&
size
))
{
return
NULL
;
return
NULL
;
}
}
...
@@ -422,7 +422,7 @@ oss_writeall(oss_audio_t *self, PyObject *args)
...
@@ -422,7 +422,7 @@ oss_writeall(oss_audio_t *self, PyObject *args)
mode, the behaviour of write() and writeall() from Python is
mode, the behaviour of write() and writeall() from Python is
indistinguishable. */
indistinguishable. */
if
(
!
PyArg_ParseTuple
(
args
,
"
s
#:write"
,
&
cp
,
&
size
))
if
(
!
PyArg_ParseTuple
(
args
,
"
y
#:write"
,
&
cp
,
&
size
))
return
NULL
;
return
NULL
;
/* use select to wait for audio device to be available */
/* use select to wait for audio device to be available */
...
@@ -811,20 +811,20 @@ oss_getattr(oss_audio_t *self, char *name)
...
@@ -811,20 +811,20 @@ oss_getattr(oss_audio_t *self, char *name)
Py_INCREF
(
rval
);
Py_INCREF
(
rval
);
}
}
else
if
(
strcmp
(
name
,
"name"
)
==
0
)
{
else
if
(
strcmp
(
name
,
"name"
)
==
0
)
{
rval
=
Py
String
_FromString
(
self
->
devicename
);
rval
=
Py
Unicode
_FromString
(
self
->
devicename
);
}
}
else
if
(
strcmp
(
name
,
"mode"
)
==
0
)
{
else
if
(
strcmp
(
name
,
"mode"
)
==
0
)
{
/* No need for a "default" in this switch: from newossobject(),
/* No need for a "default" in this switch: from newossobject(),
self->mode can only be one of these three values. */
self->mode can only be one of these three values. */
switch
(
self
->
mode
)
{
switch
(
self
->
mode
)
{
case
O_RDONLY
:
case
O_RDONLY
:
rval
=
Py
String
_FromString
(
"r"
);
rval
=
Py
Unicode
_FromString
(
"r"
);
break
;
break
;
case
O_RDWR
:
case
O_RDWR
:
rval
=
Py
String
_FromString
(
"rw"
);
rval
=
Py
Unicode
_FromString
(
"rw"
);
break
;
break
;
case
O_WRONLY
:
case
O_WRONLY
:
rval
=
Py
String
_FromString
(
"w"
);
rval
=
Py
Unicode
_FromString
(
"w"
);
break
;
break
;
}
}
}
}
...
@@ -913,12 +913,12 @@ build_namelists (PyObject *module)
...
@@ -913,12 +913,12 @@ build_namelists (PyObject *module)
if
(
labels
==
NULL
||
names
==
NULL
)
if
(
labels
==
NULL
||
names
==
NULL
)
goto
error2
;
goto
error2
;
for
(
i
=
0
;
i
<
num_controls
;
i
++
)
{
for
(
i
=
0
;
i
<
num_controls
;
i
++
)
{
s
=
Py
String
_FromString
(
control_labels
[
i
]);
s
=
Py
Unicode
_FromString
(
control_labels
[
i
]);
if
(
s
==
NULL
)
if
(
s
==
NULL
)
goto
error2
;
goto
error2
;
PyList_SET_ITEM
(
labels
,
i
,
s
);
PyList_SET_ITEM
(
labels
,
i
,
s
);
s
=
Py
String
_FromString
(
control_names
[
i
]);
s
=
Py
Unicode
_FromString
(
control_names
[
i
]);
if
(
s
==
NULL
)
if
(
s
==
NULL
)
goto
error2
;
goto
error2
;
PyList_SET_ITEM
(
names
,
i
,
s
);
PyList_SET_ITEM
(
names
,
i
,
s
);
...
...
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