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
a811c38d
Kaydet (Commit)
a811c38d
authored
Eki 19, 2006
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix various minor errors in passing arguments to
PyArg_ParseTuple.
üst
aac13162
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
16 deletions
+27
-16
callproc.c
Modules/_ctypes/callproc.c
+9
-9
_ssl.c
Modules/_ssl.c
+1
-1
audioop.c
Modules/audioop.c
+8
-3
dbmmodule.c
Modules/dbmmodule.c
+9
-3
No files found.
Modules/_ctypes/callproc.c
Dosyayı görüntüle @
a811c38d
...
@@ -1247,11 +1247,11 @@ static PyObject *py_dl_open(PyObject *self, PyObject *args)
...
@@ -1247,11 +1247,11 @@ static PyObject *py_dl_open(PyObject *self, PyObject *args)
static
PyObject
*
py_dl_close
(
PyObject
*
self
,
PyObject
*
args
)
static
PyObject
*
py_dl_close
(
PyObject
*
self
,
PyObject
*
args
)
{
{
void
*
handle
;
int
handle
;
if
(
!
PyArg_ParseTuple
(
args
,
"i:dlclose"
,
&
handle
))
if
(
!
PyArg_ParseTuple
(
args
,
"i:dlclose"
,
&
handle
))
return
NULL
;
return
NULL
;
if
(
dlclose
(
handle
))
{
if
(
dlclose
(
(
void
*
)
handle
))
{
PyErr_SetString
(
PyExc_OSError
,
PyErr_SetString
(
PyExc_OSError
,
ctypes_dlerror
());
ctypes_dlerror
());
return
NULL
;
return
NULL
;
...
@@ -1263,12 +1263,12 @@ static PyObject *py_dl_close(PyObject *self, PyObject *args)
...
@@ -1263,12 +1263,12 @@ static PyObject *py_dl_close(PyObject *self, PyObject *args)
static
PyObject
*
py_dl_sym
(
PyObject
*
self
,
PyObject
*
args
)
static
PyObject
*
py_dl_sym
(
PyObject
*
self
,
PyObject
*
args
)
{
{
char
*
name
;
char
*
name
;
void
*
handle
;
int
handle
;
void
*
ptr
;
void
*
ptr
;
if
(
!
PyArg_ParseTuple
(
args
,
"is:dlsym"
,
&
handle
,
&
name
))
if
(
!
PyArg_ParseTuple
(
args
,
"is:dlsym"
,
&
handle
,
&
name
))
return
NULL
;
return
NULL
;
ptr
=
ctypes_dlsym
(
handle
,
name
);
ptr
=
ctypes_dlsym
(
(
void
*
)
handle
,
name
);
if
(
!
ptr
)
{
if
(
!
ptr
)
{
PyErr_SetString
(
PyExc_OSError
,
PyErr_SetString
(
PyExc_OSError
,
ctypes_dlerror
());
ctypes_dlerror
());
...
@@ -1286,7 +1286,7 @@ static PyObject *py_dl_sym(PyObject *self, PyObject *args)
...
@@ -1286,7 +1286,7 @@ static PyObject *py_dl_sym(PyObject *self, PyObject *args)
static
PyObject
*
static
PyObject
*
call_function
(
PyObject
*
self
,
PyObject
*
args
)
call_function
(
PyObject
*
self
,
PyObject
*
args
)
{
{
PPROC
func
;
int
func
;
PyObject
*
arguments
;
PyObject
*
arguments
;
PyObject
*
result
;
PyObject
*
result
;
...
@@ -1296,7 +1296,7 @@ call_function(PyObject *self, PyObject *args)
...
@@ -1296,7 +1296,7 @@ call_function(PyObject *self, PyObject *args)
&
PyTuple_Type
,
&
arguments
))
&
PyTuple_Type
,
&
arguments
))
return
NULL
;
return
NULL
;
result
=
_CallProc
(
func
,
result
=
_CallProc
(
(
PPROC
)
func
,
arguments
,
arguments
,
#ifdef MS_WIN32
#ifdef MS_WIN32
NULL
,
NULL
,
...
@@ -1317,7 +1317,7 @@ call_function(PyObject *self, PyObject *args)
...
@@ -1317,7 +1317,7 @@ call_function(PyObject *self, PyObject *args)
static
PyObject
*
static
PyObject
*
call_cdeclfunction
(
PyObject
*
self
,
PyObject
*
args
)
call_cdeclfunction
(
PyObject
*
self
,
PyObject
*
args
)
{
{
PPROC
func
;
int
func
;
PyObject
*
arguments
;
PyObject
*
arguments
;
PyObject
*
result
;
PyObject
*
result
;
...
@@ -1327,7 +1327,7 @@ call_cdeclfunction(PyObject *self, PyObject *args)
...
@@ -1327,7 +1327,7 @@ call_cdeclfunction(PyObject *self, PyObject *args)
&
PyTuple_Type
,
&
arguments
))
&
PyTuple_Type
,
&
arguments
))
return
NULL
;
return
NULL
;
result
=
_CallProc
(
func
,
result
=
_CallProc
(
(
PPROC
)
func
,
arguments
,
arguments
,
#ifdef MS_WIN32
#ifdef MS_WIN32
NULL
,
NULL
,
...
@@ -1510,7 +1510,7 @@ resize(PyObject *self, PyObject *args)
...
@@ -1510,7 +1510,7 @@ resize(PyObject *self, PyObject *args)
#else
#else
"On:resize"
,
"On:resize"
,
#endif
#endif
(
PyObject
*
)
&
obj
,
&
size
))
&
obj
,
&
size
))
return
NULL
;
return
NULL
;
dict
=
PyObject_stgdict
((
PyObject
*
)
obj
);
dict
=
PyObject_stgdict
((
PyObject
*
)
obj
);
...
...
Modules/_ssl.c
Dosyayı görüntüle @
a811c38d
...
@@ -317,7 +317,7 @@ PySocket_ssl(PyObject *self, PyObject *args)
...
@@ -317,7 +317,7 @@ PySocket_ssl(PyObject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"O!|zz:ssl"
,
if
(
!
PyArg_ParseTuple
(
args
,
"O!|zz:ssl"
,
PySocketModule
.
Sock_Type
,
PySocketModule
.
Sock_Type
,
(
PyObject
*
)
&
Sock
,
&
Sock
,
&
key_file
,
&
cert_file
))
&
key_file
,
&
cert_file
))
return
NULL
;
return
NULL
;
...
...
Modules/audioop.c
Dosyayı görüntüle @
a811c38d
...
@@ -472,8 +472,12 @@ audioop_findfit(PyObject *self, PyObject *args)
...
@@ -472,8 +472,12 @@ audioop_findfit(PyObject *self, PyObject *args)
double
aj_m1
,
aj_lm1
;
double
aj_m1
,
aj_lm1
;
double
sum_ri_2
,
sum_aij_2
,
sum_aij_ri
,
result
,
best_result
,
factor
;
double
sum_ri_2
,
sum_aij_2
,
sum_aij_ri
,
result
,
best_result
,
factor
;
/* Passing a short** for an 's' argument is correct only
if the string contents is aligned for interpretation
as short[]. Due to the definition of PyStringObject,
this is currently (Python 2.6) the case. */
if
(
!
PyArg_ParseTuple
(
args
,
"s#s#:findfit"
,
if
(
!
PyArg_ParseTuple
(
args
,
"s#s#:findfit"
,
&
cp1
,
&
len1
,
&
cp2
,
&
len2
)
)
(
char
**
)
&
cp1
,
&
len1
,
(
char
**
)
&
cp2
,
&
len2
)
)
return
0
;
return
0
;
if
(
len1
&
1
||
len2
&
1
)
{
if
(
len1
&
1
||
len2
&
1
)
{
PyErr_SetString
(
AudioopError
,
"Strings should be even-sized"
);
PyErr_SetString
(
AudioopError
,
"Strings should be even-sized"
);
...
@@ -530,7 +534,7 @@ audioop_findfactor(PyObject *self, PyObject *args)
...
@@ -530,7 +534,7 @@ audioop_findfactor(PyObject *self, PyObject *args)
double
sum_ri_2
,
sum_aij_ri
,
result
;
double
sum_ri_2
,
sum_aij_ri
,
result
;
if
(
!
PyArg_ParseTuple
(
args
,
"s#s#:findfactor"
,
if
(
!
PyArg_ParseTuple
(
args
,
"s#s#:findfactor"
,
&
cp1
,
&
len1
,
&
cp2
,
&
len2
)
)
(
char
**
)
&
cp1
,
&
len1
,
(
char
**
)
&
cp2
,
&
len2
)
)
return
0
;
return
0
;
if
(
len1
&
1
||
len2
&
1
)
{
if
(
len1
&
1
||
len2
&
1
)
{
PyErr_SetString
(
AudioopError
,
"Strings should be even-sized"
);
PyErr_SetString
(
AudioopError
,
"Strings should be even-sized"
);
...
@@ -562,7 +566,8 @@ audioop_findmax(PyObject *self, PyObject *args)
...
@@ -562,7 +566,8 @@ audioop_findmax(PyObject *self, PyObject *args)
double
aj_m1
,
aj_lm1
;
double
aj_m1
,
aj_lm1
;
double
result
,
best_result
;
double
result
,
best_result
;
if
(
!
PyArg_ParseTuple
(
args
,
"s#i:findmax"
,
&
cp1
,
&
len1
,
&
len2
)
)
if
(
!
PyArg_ParseTuple
(
args
,
"s#i:findmax"
,
(
char
**
)
&
cp1
,
&
len1
,
&
len2
)
)
return
0
;
return
0
;
if
(
len1
&
1
)
{
if
(
len1
&
1
)
{
PyErr_SetString
(
AudioopError
,
"Strings should be even-sized"
);
PyErr_SetString
(
AudioopError
,
"Strings should be even-sized"
);
...
...
Modules/dbmmodule.c
Dosyayı görüntüle @
a811c38d
...
@@ -208,11 +208,13 @@ dbm_keys(register dbmobject *dp, PyObject *unused)
...
@@ -208,11 +208,13 @@ dbm_keys(register dbmobject *dp, PyObject *unused)
static
PyObject
*
static
PyObject
*
dbm_has_key
(
register
dbmobject
*
dp
,
PyObject
*
args
)
dbm_has_key
(
register
dbmobject
*
dp
,
PyObject
*
args
)
{
{
char
*
tmp_ptr
;
datum
key
,
val
;
datum
key
,
val
;
int
tmp_size
;
int
tmp_size
;
if
(
!
PyArg_ParseTuple
(
args
,
"s#:has_key"
,
&
key
.
d
ptr
,
&
tmp_size
))
if
(
!
PyArg_ParseTuple
(
args
,
"s#:has_key"
,
&
tmp_
ptr
,
&
tmp_size
))
return
NULL
;
return
NULL
;
key
.
dptr
=
tmp_ptr
;
key
.
dsize
=
tmp_size
;
key
.
dsize
=
tmp_size
;
check_dbmobject_open
(
dp
);
check_dbmobject_open
(
dp
);
val
=
dbm_fetch
(
dp
->
di_dbm
,
key
);
val
=
dbm_fetch
(
dp
->
di_dbm
,
key
);
...
@@ -224,11 +226,13 @@ dbm_get(register dbmobject *dp, PyObject *args)
...
@@ -224,11 +226,13 @@ dbm_get(register dbmobject *dp, PyObject *args)
{
{
datum
key
,
val
;
datum
key
,
val
;
PyObject
*
defvalue
=
Py_None
;
PyObject
*
defvalue
=
Py_None
;
char
*
tmp_ptr
;
int
tmp_size
;
int
tmp_size
;
if
(
!
PyArg_ParseTuple
(
args
,
"s#|O:get"
,
if
(
!
PyArg_ParseTuple
(
args
,
"s#|O:get"
,
&
key
.
d
ptr
,
&
tmp_size
,
&
defvalue
))
&
tmp_
ptr
,
&
tmp_size
,
&
defvalue
))
return
NULL
;
return
NULL
;
key
.
dptr
=
tmp_ptr
;
key
.
dsize
=
tmp_size
;
key
.
dsize
=
tmp_size
;
check_dbmobject_open
(
dp
);
check_dbmobject_open
(
dp
);
val
=
dbm_fetch
(
dp
->
di_dbm
,
key
);
val
=
dbm_fetch
(
dp
->
di_dbm
,
key
);
...
@@ -245,11 +249,13 @@ dbm_setdefault(register dbmobject *dp, PyObject *args)
...
@@ -245,11 +249,13 @@ dbm_setdefault(register dbmobject *dp, PyObject *args)
{
{
datum
key
,
val
;
datum
key
,
val
;
PyObject
*
defvalue
=
NULL
;
PyObject
*
defvalue
=
NULL
;
char
*
tmp_ptr
;
int
tmp_size
;
int
tmp_size
;
if
(
!
PyArg_ParseTuple
(
args
,
"s#|S:setdefault"
,
if
(
!
PyArg_ParseTuple
(
args
,
"s#|S:setdefault"
,
&
key
.
d
ptr
,
&
tmp_size
,
&
defvalue
))
&
tmp_
ptr
,
&
tmp_size
,
&
defvalue
))
return
NULL
;
return
NULL
;
key
.
dptr
=
tmp_ptr
;
key
.
dsize
=
tmp_size
;
key
.
dsize
=
tmp_size
;
check_dbmobject_open
(
dp
);
check_dbmobject_open
(
dp
);
val
=
dbm_fetch
(
dp
->
di_dbm
,
key
);
val
=
dbm_fetch
(
dp
->
di_dbm
,
key
);
...
...
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