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
7cbc0f55
Kaydet (Commit)
7cbc0f55
authored
Nis 13, 2006
tarafından
Anthony Baxter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
C++ compiler changes. casts, rename variables with reserved names.
üst
3c6e4188
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
32 deletions
+32
-32
_hotshot.c
Modules/_hotshot.c
+2
-2
stropmodule.c
Modules/stropmodule.c
+29
-29
timemodule.c
Modules/timemodule.c
+1
-1
No files found.
Modules/_hotshot.c
Dosyayı görüntüle @
7cbc0f55
...
@@ -308,7 +308,7 @@ unpack_string(LogReaderObject *self, PyObject **pvalue)
...
@@ -308,7 +308,7 @@ unpack_string(LogReaderObject *self, PyObject **pvalue)
if
((
err
=
unpack_packed_int
(
self
,
&
len
,
0
)))
if
((
err
=
unpack_packed_int
(
self
,
&
len
,
0
)))
return
err
;
return
err
;
buf
=
malloc
(
len
);
buf
=
(
char
*
)
malloc
(
len
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
for
(
i
=
0
;
i
<
len
;
i
++
)
{
ch
=
fgetc
(
self
->
logfp
);
ch
=
fgetc
(
self
->
logfp
);
buf
[
i
]
=
ch
;
buf
[
i
]
=
ch
;
...
@@ -1403,7 +1403,7 @@ get_version_string(void)
...
@@ -1403,7 +1403,7 @@ get_version_string(void)
++
rev
;
++
rev
;
while
(
rev
[
i
]
!=
' '
&&
rev
[
i
]
!=
'\0'
)
while
(
rev
[
i
]
!=
' '
&&
rev
[
i
]
!=
'\0'
)
++
i
;
++
i
;
buffer
=
malloc
(
i
+
1
);
buffer
=
(
char
*
)
malloc
(
i
+
1
);
if
(
buffer
!=
NULL
)
{
if
(
buffer
!=
NULL
)
{
memmove
(
buffer
,
rev
,
i
);
memmove
(
buffer
,
rev
,
i
);
buffer
[
i
]
=
'\0'
;
buffer
[
i
]
=
'\0'
;
...
...
Modules/stropmodule.c
Dosyayı görüntüle @
7cbc0f55
...
@@ -446,16 +446,16 @@ strop_lower(PyObject *self, PyObject *args)
...
@@ -446,16 +446,16 @@ strop_lower(PyObject *self, PyObject *args)
{
{
char
*
s
,
*
s_new
;
char
*
s
,
*
s_new
;
Py_ssize_t
i
,
n
;
Py_ssize_t
i
,
n
;
PyObject
*
new
;
PyObject
*
new
str
;
int
changed
;
int
changed
;
WARN
;
WARN
;
if
(
PyString_AsStringAndSize
(
args
,
&
s
,
&
n
))
if
(
PyString_AsStringAndSize
(
args
,
&
s
,
&
n
))
return
NULL
;
return
NULL
;
new
=
PyString_FromStringAndSize
(
NULL
,
n
);
new
str
=
PyString_FromStringAndSize
(
NULL
,
n
);
if
(
new
==
NULL
)
if
(
new
str
==
NULL
)
return
NULL
;
return
NULL
;
s_new
=
PyString_AsString
(
new
);
s_new
=
PyString_AsString
(
new
str
);
changed
=
0
;
changed
=
0
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
int
c
=
Py_CHARMASK
(
*
s
++
);
int
c
=
Py_CHARMASK
(
*
s
++
);
...
@@ -467,11 +467,11 @@ strop_lower(PyObject *self, PyObject *args)
...
@@ -467,11 +467,11 @@ strop_lower(PyObject *self, PyObject *args)
s_new
++
;
s_new
++
;
}
}
if
(
!
changed
)
{
if
(
!
changed
)
{
Py_DECREF
(
new
);
Py_DECREF
(
new
str
);
Py_INCREF
(
args
);
Py_INCREF
(
args
);
return
args
;
return
args
;
}
}
return
new
;
return
new
str
;
}
}
...
@@ -485,16 +485,16 @@ strop_upper(PyObject *self, PyObject *args)
...
@@ -485,16 +485,16 @@ strop_upper(PyObject *self, PyObject *args)
{
{
char
*
s
,
*
s_new
;
char
*
s
,
*
s_new
;
Py_ssize_t
i
,
n
;
Py_ssize_t
i
,
n
;
PyObject
*
new
;
PyObject
*
new
str
;
int
changed
;
int
changed
;
WARN
;
WARN
;
if
(
PyString_AsStringAndSize
(
args
,
&
s
,
&
n
))
if
(
PyString_AsStringAndSize
(
args
,
&
s
,
&
n
))
return
NULL
;
return
NULL
;
new
=
PyString_FromStringAndSize
(
NULL
,
n
);
new
str
=
PyString_FromStringAndSize
(
NULL
,
n
);
if
(
new
==
NULL
)
if
(
new
str
==
NULL
)
return
NULL
;
return
NULL
;
s_new
=
PyString_AsString
(
new
);
s_new
=
PyString_AsString
(
new
str
);
changed
=
0
;
changed
=
0
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
int
c
=
Py_CHARMASK
(
*
s
++
);
int
c
=
Py_CHARMASK
(
*
s
++
);
...
@@ -506,11 +506,11 @@ strop_upper(PyObject *self, PyObject *args)
...
@@ -506,11 +506,11 @@ strop_upper(PyObject *self, PyObject *args)
s_new
++
;
s_new
++
;
}
}
if
(
!
changed
)
{
if
(
!
changed
)
{
Py_DECREF
(
new
);
Py_DECREF
(
new
str
);
Py_INCREF
(
args
);
Py_INCREF
(
args
);
return
args
;
return
args
;
}
}
return
new
;
return
new
str
;
}
}
...
@@ -525,16 +525,16 @@ strop_capitalize(PyObject *self, PyObject *args)
...
@@ -525,16 +525,16 @@ strop_capitalize(PyObject *self, PyObject *args)
{
{
char
*
s
,
*
s_new
;
char
*
s
,
*
s_new
;
Py_ssize_t
i
,
n
;
Py_ssize_t
i
,
n
;
PyObject
*
new
;
PyObject
*
new
str
;
int
changed
;
int
changed
;
WARN
;
WARN
;
if
(
PyString_AsStringAndSize
(
args
,
&
s
,
&
n
))
if
(
PyString_AsStringAndSize
(
args
,
&
s
,
&
n
))
return
NULL
;
return
NULL
;
new
=
PyString_FromStringAndSize
(
NULL
,
n
);
new
str
=
PyString_FromStringAndSize
(
NULL
,
n
);
if
(
new
==
NULL
)
if
(
new
str
==
NULL
)
return
NULL
;
return
NULL
;
s_new
=
PyString_AsString
(
new
);
s_new
=
PyString_AsString
(
new
str
);
changed
=
0
;
changed
=
0
;
if
(
0
<
n
)
{
if
(
0
<
n
)
{
int
c
=
Py_CHARMASK
(
*
s
++
);
int
c
=
Py_CHARMASK
(
*
s
++
);
...
@@ -555,11 +555,11 @@ strop_capitalize(PyObject *self, PyObject *args)
...
@@ -555,11 +555,11 @@ strop_capitalize(PyObject *self, PyObject *args)
s_new
++
;
s_new
++
;
}
}
if
(
!
changed
)
{
if
(
!
changed
)
{
Py_DECREF
(
new
);
Py_DECREF
(
new
str
);
Py_INCREF
(
args
);
Py_INCREF
(
args
);
return
args
;
return
args
;
}
}
return
new
;
return
new
str
;
}
}
...
@@ -691,16 +691,16 @@ strop_swapcase(PyObject *self, PyObject *args)
...
@@ -691,16 +691,16 @@ strop_swapcase(PyObject *self, PyObject *args)
{
{
char
*
s
,
*
s_new
;
char
*
s
,
*
s_new
;
Py_ssize_t
i
,
n
;
Py_ssize_t
i
,
n
;
PyObject
*
new
;
PyObject
*
new
str
;
int
changed
;
int
changed
;
WARN
;
WARN
;
if
(
PyString_AsStringAndSize
(
args
,
&
s
,
&
n
))
if
(
PyString_AsStringAndSize
(
args
,
&
s
,
&
n
))
return
NULL
;
return
NULL
;
new
=
PyString_FromStringAndSize
(
NULL
,
n
);
new
str
=
PyString_FromStringAndSize
(
NULL
,
n
);
if
(
new
==
NULL
)
if
(
new
str
==
NULL
)
return
NULL
;
return
NULL
;
s_new
=
PyString_AsString
(
new
);
s_new
=
PyString_AsString
(
new
str
);
changed
=
0
;
changed
=
0
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
int
c
=
Py_CHARMASK
(
*
s
++
);
int
c
=
Py_CHARMASK
(
*
s
++
);
...
@@ -717,11 +717,11 @@ strop_swapcase(PyObject *self, PyObject *args)
...
@@ -717,11 +717,11 @@ strop_swapcase(PyObject *self, PyObject *args)
s_new
++
;
s_new
++
;
}
}
if
(
!
changed
)
{
if
(
!
changed
)
{
Py_DECREF
(
new
);
Py_DECREF
(
new
str
);
Py_INCREF
(
args
);
Py_INCREF
(
args
);
return
args
;
return
args
;
}
}
return
new
;
return
new
str
;
}
}
...
@@ -1141,7 +1141,7 @@ strop_replace(PyObject *self, PyObject *args)
...
@@ -1141,7 +1141,7 @@ strop_replace(PyObject *self, PyObject *args)
char
*
str
,
*
pat
,
*
sub
,
*
new_s
;
char
*
str
,
*
pat
,
*
sub
,
*
new_s
;
Py_ssize_t
len
,
pat_len
,
sub_len
,
out_len
;
Py_ssize_t
len
,
pat_len
,
sub_len
,
out_len
;
Py_ssize_t
count
=
-
1
;
Py_ssize_t
count
=
-
1
;
PyObject
*
new
;
PyObject
*
new
str
;
WARN
;
WARN
;
if
(
!
PyArg_ParseTuple
(
args
,
"t#t#t#|n:replace"
,
if
(
!
PyArg_ParseTuple
(
args
,
"t#t#t#|n:replace"
,
...
@@ -1165,14 +1165,14 @@ strop_replace(PyObject *self, PyObject *args)
...
@@ -1165,14 +1165,14 @@ strop_replace(PyObject *self, PyObject *args)
}
}
if
(
out_len
==
-
1
)
{
if
(
out_len
==
-
1
)
{
/* we're returning another reference to the input string */
/* we're returning another reference to the input string */
new
=
PyTuple_GetItem
(
args
,
0
);
new
str
=
PyTuple_GetItem
(
args
,
0
);
Py_XINCREF
(
new
);
Py_XINCREF
(
new
str
);
}
}
else
{
else
{
new
=
PyString_FromStringAndSize
(
new_s
,
out_len
);
new
str
=
PyString_FromStringAndSize
(
new_s
,
out_len
);
PyMem_FREE
(
new_s
);
PyMem_FREE
(
new_s
);
}
}
return
new
;
return
new
str
;
}
}
...
...
Modules/timemodule.c
Dosyayı görüntüle @
7cbc0f55
...
@@ -443,7 +443,7 @@ time_strftime(PyObject *self, PyObject *args)
...
@@ -443,7 +443,7 @@ time_strftime(PyObject *self, PyObject *args)
* will be ahead of time...
* will be ahead of time...
*/
*/
for
(
i
=
1024
;
;
i
+=
i
)
{
for
(
i
=
1024
;
;
i
+=
i
)
{
outbuf
=
malloc
(
i
);
outbuf
=
(
char
*
)
malloc
(
i
);
if
(
outbuf
==
NULL
)
{
if
(
outbuf
==
NULL
)
{
return
PyErr_NoMemory
();
return
PyErr_NoMemory
();
}
}
...
...
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