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
b05d3be2
Kaydet (Commit)
b05d3be2
authored
Eki 26, 2009
tarafından
Eric Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Continue removing _PyOS_double_to_string, as mentioned in issue 7117.
üst
cfaf79c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
cPickle.c
Modules/cPickle.c
+22
-8
No files found.
Modules/cPickle.c
Dosyayı görüntüle @
b05d3be2
...
...
@@ -1170,15 +1170,29 @@ save_float(Picklerobject *self, PyObject *args)
return
-
1
;
}
else
{
char
c_str
[
250
];
c_str
[
0
]
=
FLOAT
;
_PyOS_double_to_string
(
c_str
+
1
,
sizeof
(
c_str
)
-
2
,
x
,
'g'
,
17
,
0
,
NULL
);
/* Extend the formatted string with a newline character */
strcat
(
c_str
,
"
\n
"
);
int
result
=
-
1
;
char
*
buf
=
NULL
;
char
op
=
FLOAT
;
if
(
self
->
write_func
(
self
,
c_str
,
strlen
(
c_str
))
<
0
)
return
-
1
;
if
(
self
->
write_func
(
self
,
&
op
,
1
)
<
0
)
goto
done
;
buf
=
PyOS_double_to_string
(
x
,
'g'
,
17
,
0
,
NULL
);
if
(
!
buf
)
{
PyErr_NoMemory
();
goto
done
;
}
if
(
self
->
write_func
(
self
,
buf
,
strlen
(
buf
))
<
0
)
goto
done
;
if
(
self
->
write_func
(
self
,
"
\n
"
,
1
)
<
0
)
goto
done
;
result
=
0
;
done:
PyMem_Free
(
buf
);
return
result
;
}
return
0
;
...
...
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