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
448f4bf4
Kaydet (Commit)
448f4bf4
authored
Agu 19, 1992
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
added getname, getdefault and getminmax functions
üst
2b81dc9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
almodule.c
Modules/almodule.c
+43
-0
No files found.
Modules/almodule.c
Dosyayı görüntüle @
448f4bf4
...
...
@@ -566,12 +566,55 @@ al_setparams(self, args)
return
doParams
(
args
,
ALsetparams
,
0
);
}
static
object
*
al_getname
(
self
,
args
)
object
*
self
,
*
args
;
{
long
device
,
descriptor
;
char
*
name
;
if
(
!
getargs
(
args
,
"(ll)"
,
&
device
,
&
descriptor
))
return
NULL
;
name
=
ALgetname
(
device
,
descriptor
);
if
(
name
==
NULL
)
{
err_setstr
(
ValueError
,
"al.getname: bad descriptor"
);
return
NULL
;
}
return
newstringobject
(
name
);
}
static
object
*
al_getdefault
(
self
,
args
)
object
*
self
,
*
args
;
{
long
device
,
descriptor
,
value
;
if
(
!
getargs
(
args
,
"(ll)"
,
&
device
,
&
descriptor
))
return
NULL
;
value
=
ALgetdefault
(
device
,
descriptor
);
return
newlongobject
(
value
);
}
static
object
*
al_getminmax
(
self
,
args
)
object
*
self
,
*
args
;
{
long
device
,
descriptor
,
min
,
max
;
if
(
!
getargs
(
args
,
"(ll)"
,
&
device
,
&
descriptor
))
return
NULL
;
min
=
-
1
;
max
=
-
1
;
ALgetminmax
(
device
,
descriptor
,
&
min
,
&
max
);
return
mkvalue
(
"ll"
,
min
,
max
);
}
static
struct
methodlist
al_methods
[]
=
{
{
"openport"
,
al_openport
},
{
"newconfig"
,
al_newconfig
},
{
"queryparams"
,
al_queryparams
},
{
"getparams"
,
al_getparams
},
{
"setparams"
,
al_setparams
},
{
"getname"
,
al_getname
},
{
"getdefault"
,
al_getdefault
},
{
"getminmax"
,
al_getminmax
},
{
NULL
,
NULL
}
/* sentinel */
};
...
...
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