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
75cdad55
Kaydet (Commit)
75cdad55
authored
Kas 28, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More sprintf -> PyOS_snprintf.
üst
179c48c6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
9 deletions
+14
-9
almodule.c
Modules/almodule.c
+2
-1
posixmodule.c
Modules/posixmodule.c
+3
-3
socketmodule.c
Modules/socketmodule.c
+2
-1
stropmodule.c
Modules/stropmodule.c
+4
-2
thread_beos.h
Python/thread_beos.h
+3
-2
No files found.
Modules/almodule.c
Dosyayı görüntüle @
75cdad55
...
@@ -1519,7 +1519,8 @@ al_GetParams(PyObject *self, PyObject *args)
...
@@ -1519,7 +1519,8 @@ al_GetParams(PyObject *self, PyObject *args)
for
(
i
=
0
;
i
<
npvs
;
i
++
)
{
for
(
i
=
0
;
i
<
npvs
;
i
++
)
{
if
(
pvs
[
i
].
sizeOut
<
0
)
{
if
(
pvs
[
i
].
sizeOut
<
0
)
{
char
buf
[
32
];
char
buf
[
32
];
sprintf
(
buf
,
"problem with param %d"
,
i
);
PyOS_snprintf
(
buf
,
sizeof
(
buf
),
"problem with param %d"
,
i
);
PyErr_SetString
(
ErrorObject
,
buf
);
PyErr_SetString
(
ErrorObject
,
buf
);
goto
error
;
goto
error
;
}
}
...
...
Modules/posixmodule.c
Dosyayı görüntüle @
75cdad55
...
@@ -2555,7 +2555,7 @@ _PyPopenCreateProcess(char *cmdstring,
...
@@ -2555,7 +2555,7 @@ _PyPopenCreateProcess(char *cmdstring,
x
=
i
+
strlen
(
s3
)
+
strlen
(
cmdstring
)
+
1
;
x
=
i
+
strlen
(
s3
)
+
strlen
(
cmdstring
)
+
1
;
s2
=
(
char
*
)
_alloca
(
x
);
s2
=
(
char
*
)
_alloca
(
x
);
ZeroMemory
(
s2
,
x
);
ZeroMemory
(
s2
,
x
);
sprintf
(
s2
,
"%s%s%s"
,
s1
,
s3
,
cmdstring
);
PyOS_snprintf
(
s2
,
x
,
"%s%s%s"
,
s1
,
s3
,
cmdstring
);
}
}
else
{
else
{
/*
/*
...
@@ -2608,8 +2608,8 @@ _PyPopenCreateProcess(char *cmdstring,
...
@@ -2608,8 +2608,8 @@ _PyPopenCreateProcess(char *cmdstring,
s2
=
(
char
*
)
_alloca
(
x
);
s2
=
(
char
*
)
_alloca
(
x
);
ZeroMemory
(
s2
,
x
);
ZeroMemory
(
s2
,
x
);
s
printf
(
PyOS_sn
printf
(
s2
,
s2
,
x
,
"%s
\"
%s%s%s
\"
"
,
"%s
\"
%s%s%s
\"
"
,
modulepath
,
modulepath
,
s1
,
s1
,
...
...
Modules/socketmodule.c
Dosyayı görüntüle @
75cdad55
...
@@ -3089,7 +3089,8 @@ OS2init(void)
...
@@ -3089,7 +3089,8 @@ OS2init(void)
return
1
;
/* Indicate Success */
return
1
;
/* Indicate Success */
}
}
sprintf
(
reason
,
"OS/2 TCP/IP Error# %d"
,
sock_errno
());
PyOS_snprintf
(
reason
,
sizeof
(
reason
),
"OS/2 TCP/IP Error# %d"
,
sock_errno
());
PyErr_SetString
(
PyExc_ImportError
,
reason
);
PyErr_SetString
(
PyExc_ImportError
,
reason
);
return
0
;
/* Indicate Failure */
return
0
;
/* Indicate Failure */
...
...
Modules/stropmodule.c
Dosyayı görüntüle @
75cdad55
...
@@ -778,7 +778,8 @@ strop_atoi(PyObject *self, PyObject *args)
...
@@ -778,7 +778,8 @@ strop_atoi(PyObject *self, PyObject *args)
return
NULL
;
return
NULL
;
}
}
else
if
(
errno
!=
0
)
{
else
if
(
errno
!=
0
)
{
sprintf
(
buffer
,
"atoi() literal too large: %.200s"
,
s
);
PyOS_snprintf
(
buffer
,
sizeof
(
buffer
),
"atoi() literal too large: %.200s"
,
s
);
PyErr_SetString
(
PyExc_ValueError
,
buffer
);
PyErr_SetString
(
PyExc_ValueError
,
buffer
);
return
NULL
;
return
NULL
;
}
}
...
@@ -828,7 +829,8 @@ strop_atol(PyObject *self, PyObject *args)
...
@@ -828,7 +829,8 @@ strop_atol(PyObject *self, PyObject *args)
while
(
*
end
&&
isspace
(
Py_CHARMASK
(
*
end
)))
while
(
*
end
&&
isspace
(
Py_CHARMASK
(
*
end
)))
end
++
;
end
++
;
if
(
*
end
!=
'\0'
)
{
if
(
*
end
!=
'\0'
)
{
sprintf
(
buffer
,
"invalid literal for atol(): %.200s"
,
s
);
PyOS_snprintf
(
buffer
,
sizeof
(
buffer
),
"invalid literal for atol(): %.200s"
,
s
);
PyErr_SetString
(
PyExc_ValueError
,
buffer
);
PyErr_SetString
(
PyExc_ValueError
,
buffer
);
Py_DECREF
(
x
);
Py_DECREF
(
x
);
return
NULL
;
return
NULL
;
...
...
Python/thread_beos.h
Dosyayı görüntüle @
75cdad55
...
@@ -123,7 +123,8 @@ long PyThread_start_new_thread( void (*func)(void *), void *arg )
...
@@ -123,7 +123,8 @@ long PyThread_start_new_thread( void (*func)(void *), void *arg )
/* We are so very thread-safe... */
/* We are so very thread-safe... */
this_thread
=
atomic_add
(
&
thread_count
,
1
);
this_thread
=
atomic_add
(
&
thread_count
,
1
);
sprintf
(
name
,
"python thread (%d)"
,
this_thread
);
PyOS_snprintf
(
name
,
sizeof
(
name
),
"python thread (%d)"
,
this_thread
);
tid
=
spawn_thread
(
(
thread_func
)
func
,
name
,
tid
=
spawn_thread
(
(
thread_func
)
func
,
name
,
B_NORMAL_PRIORITY
,
arg
);
B_NORMAL_PRIORITY
,
arg
);
...
@@ -222,7 +223,7 @@ PyThread_type_lock PyThread_allocate_lock( void )
...
@@ -222,7 +223,7 @@ PyThread_type_lock PyThread_allocate_lock( void )
}
}
this_lock
=
atomic_add
(
&
lock_count
,
1
);
this_lock
=
atomic_add
(
&
lock_count
,
1
);
sprintf
(
name
,
"python lock (%d)"
,
this_lock
);
PyOS_snprintf
(
name
,
sizeof
(
name
),
"python lock (%d)"
,
this_lock
);
retval
=
benaphore_create
(
name
,
lock
);
retval
=
benaphore_create
(
name
,
lock
);
if
(
retval
!=
EOK
)
{
if
(
retval
!=
EOK
)
{
...
...
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