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
b9b68ae7
Kaydet (Commit)
b9b68ae7
authored
Tem 16, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#3305: self->stream can be NULL.
üst
86cbf81b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
test_multibytecodec.py
Lib/test/test_multibytecodec.py
+9
-0
multibytecodec.c
Modules/cjkcodecs/multibytecodec.c
+2
-2
No files found.
Lib/test/test_multibytecodec.py
Dosyayı görüntüle @
b9b68ae7
...
...
@@ -8,6 +8,7 @@ from test import test_support
from
test
import
test_multibytecodec_support
from
test.test_support
import
TESTFN
import
unittest
,
StringIO
,
codecs
,
sys
,
os
import
_multibytecodec
ALL_CJKENCODINGS
=
[
# _codecs_cn
...
...
@@ -53,6 +54,14 @@ class Test_MultibyteCodec(unittest.TestCase):
finally
:
os
.
unlink
(
TESTFN
)
def
test_init_segfault
(
self
):
# bug #3305: this used to segfault
self
.
assertRaises
(
AttributeError
,
_multibytecodec
.
MultibyteStreamReader
,
None
)
self
.
assertRaises
(
AttributeError
,
_multibytecodec
.
MultibyteStreamWriter
,
None
)
class
Test_IncrementalEncoder
(
unittest
.
TestCase
):
def
test_stateless
(
self
):
...
...
Modules/cjkcodecs/multibytecodec.c
Dosyayı görüntüle @
b9b68ae7
...
...
@@ -1484,7 +1484,7 @@ mbstreamreader_dealloc(MultibyteStreamReaderObject *self)
{
PyObject_GC_UnTrack
(
self
);
ERROR_DECREF
(
self
->
errors
);
Py_DECREF
(
self
->
stream
);
Py_
X
DECREF
(
self
->
stream
);
Py_TYPE
(
self
)
->
tp_free
(
self
);
}
...
...
@@ -1686,7 +1686,7 @@ mbstreamwriter_dealloc(MultibyteStreamWriterObject *self)
{
PyObject_GC_UnTrack
(
self
);
ERROR_DECREF
(
self
->
errors
);
Py_DECREF
(
self
->
stream
);
Py_
X
DECREF
(
self
->
stream
);
Py_TYPE
(
self
)
->
tp_free
(
self
);
}
...
...
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