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
bb5b92d3
Kaydet (Commit)
bb5b92d3
authored
Ock 18, 2012
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge refleak fixes from 3.2
üst
fff47ab3
fc1b6f00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
75 deletions
+64
-75
_iomodule.c
Modules/_io/_iomodule.c
+41
-54
exceptions.c
Objects/exceptions.c
+23
-21
No files found.
Modules/_io/_iomodule.c
Dosyayı görüntüle @
bb5b92d3
...
...
@@ -677,60 +677,47 @@ PyInit__io(void)
ADD_TYPE
(
&
PyIncrementalNewlineDecoder_Type
,
"IncrementalNewlineDecoder"
);
/* Interned strings */
if
(
!
(
_PyIO_str_close
=
PyUnicode_InternFromString
(
"close"
)))
goto
fail
;
if
(
!
(
_PyIO_str_closed
=
PyUnicode_InternFromString
(
"closed"
)))
goto
fail
;
if
(
!
(
_PyIO_str_decode
=
PyUnicode_InternFromString
(
"decode"
)))
goto
fail
;
if
(
!
(
_PyIO_str_encode
=
PyUnicode_InternFromString
(
"encode"
)))
goto
fail
;
if
(
!
(
_PyIO_str_fileno
=
PyUnicode_InternFromString
(
"fileno"
)))
goto
fail
;
if
(
!
(
_PyIO_str_flush
=
PyUnicode_InternFromString
(
"flush"
)))
goto
fail
;
if
(
!
(
_PyIO_str_getstate
=
PyUnicode_InternFromString
(
"getstate"
)))
goto
fail
;
if
(
!
(
_PyIO_str_isatty
=
PyUnicode_InternFromString
(
"isatty"
)))
goto
fail
;
if
(
!
(
_PyIO_str_newlines
=
PyUnicode_InternFromString
(
"newlines"
)))
goto
fail
;
if
(
!
(
_PyIO_str_nl
=
PyUnicode_InternFromString
(
"
\n
"
)))
goto
fail
;
if
(
!
(
_PyIO_str_read
=
PyUnicode_InternFromString
(
"read"
)))
goto
fail
;
if
(
!
(
_PyIO_str_read1
=
PyUnicode_InternFromString
(
"read1"
)))
goto
fail
;
if
(
!
(
_PyIO_str_readable
=
PyUnicode_InternFromString
(
"readable"
)))
goto
fail
;
if
(
!
(
_PyIO_str_readall
=
PyUnicode_InternFromString
(
"readall"
)))
goto
fail
;
if
(
!
(
_PyIO_str_readinto
=
PyUnicode_InternFromString
(
"readinto"
)))
goto
fail
;
if
(
!
(
_PyIO_str_readline
=
PyUnicode_InternFromString
(
"readline"
)))
goto
fail
;
if
(
!
(
_PyIO_str_reset
=
PyUnicode_InternFromString
(
"reset"
)))
goto
fail
;
if
(
!
(
_PyIO_str_seek
=
PyUnicode_InternFromString
(
"seek"
)))
goto
fail
;
if
(
!
(
_PyIO_str_seekable
=
PyUnicode_InternFromString
(
"seekable"
)))
goto
fail
;
if
(
!
(
_PyIO_str_setstate
=
PyUnicode_InternFromString
(
"setstate"
)))
goto
fail
;
if
(
!
(
_PyIO_str_tell
=
PyUnicode_InternFromString
(
"tell"
)))
goto
fail
;
if
(
!
(
_PyIO_str_truncate
=
PyUnicode_InternFromString
(
"truncate"
)))
goto
fail
;
if
(
!
(
_PyIO_str_write
=
PyUnicode_InternFromString
(
"write"
)))
goto
fail
;
if
(
!
(
_PyIO_str_writable
=
PyUnicode_InternFromString
(
"writable"
)))
goto
fail
;
if
(
!
(
_PyIO_empty_str
=
PyUnicode_FromStringAndSize
(
NULL
,
0
)))
goto
fail
;
if
(
!
(
_PyIO_empty_bytes
=
PyBytes_FromStringAndSize
(
NULL
,
0
)))
goto
fail
;
if
(
!
(
_PyIO_zero
=
PyLong_FromLong
(
0L
)))
#define ADD_INTERNED(name) \
if (!_PyIO_str_ ## name && \
!(_PyIO_str_ ## name = PyUnicode_InternFromString(# name))) \
goto fail;
ADD_INTERNED
(
close
)
ADD_INTERNED
(
closed
)
ADD_INTERNED
(
decode
)
ADD_INTERNED
(
encode
)
ADD_INTERNED
(
fileno
)
ADD_INTERNED
(
flush
)
ADD_INTERNED
(
getstate
)
ADD_INTERNED
(
isatty
)
ADD_INTERNED
(
newlines
)
ADD_INTERNED
(
read
)
ADD_INTERNED
(
read1
)
ADD_INTERNED
(
readable
)
ADD_INTERNED
(
readall
)
ADD_INTERNED
(
readinto
)
ADD_INTERNED
(
readline
)
ADD_INTERNED
(
reset
)
ADD_INTERNED
(
seek
)
ADD_INTERNED
(
seekable
)
ADD_INTERNED
(
setstate
)
ADD_INTERNED
(
tell
)
ADD_INTERNED
(
truncate
)
ADD_INTERNED
(
write
)
ADD_INTERNED
(
writable
)
if
(
!
_PyIO_str_nl
&&
!
(
_PyIO_str_nl
=
PyUnicode_InternFromString
(
"
\n
"
)))
goto
fail
;
if
(
!
_PyIO_empty_str
&&
!
(
_PyIO_empty_str
=
PyUnicode_FromStringAndSize
(
NULL
,
0
)))
goto
fail
;
if
(
!
_PyIO_empty_bytes
&&
!
(
_PyIO_empty_bytes
=
PyBytes_FromStringAndSize
(
NULL
,
0
)))
goto
fail
;
if
(
!
_PyIO_zero
&&
!
(
_PyIO_zero
=
PyLong_FromLong
(
0L
)))
goto
fail
;
state
->
initialized
=
1
;
...
...
Objects/exceptions.c
Dosyayı görüntüle @
bb5b92d3
...
...
@@ -2437,27 +2437,29 @@ _PyExc_Init(void)
preallocate_memerrors
();
PyExc_RecursionErrorInst
=
BaseException_new
(
&
_PyExc_RuntimeError
,
NULL
,
NULL
);
if
(
!
PyExc_RecursionErrorInst
)
Py_FatalError
(
"Cannot pre-allocate RuntimeError instance for "
"recursion errors"
);
else
{
PyBaseExceptionObject
*
err_inst
=
(
PyBaseExceptionObject
*
)
PyExc_RecursionErrorInst
;
PyObject
*
args_tuple
;
PyObject
*
exc_message
;
exc_message
=
PyUnicode_FromString
(
"maximum recursion depth exceeded"
);
if
(
!
exc_message
)
Py_FatalError
(
"cannot allocate argument for RuntimeError "
"pre-allocation"
);
args_tuple
=
PyTuple_Pack
(
1
,
exc_message
);
if
(
!
args_tuple
)
Py_FatalError
(
"cannot allocate tuple for RuntimeError "
"pre-allocation"
);
Py_DECREF
(
exc_message
);
if
(
BaseException_init
(
err_inst
,
args_tuple
,
NULL
))
Py_FatalError
(
"init of pre-allocated RuntimeError failed"
);
Py_DECREF
(
args_tuple
);
if
(
!
PyExc_RecursionErrorInst
)
{
PyExc_RecursionErrorInst
=
BaseException_new
(
&
_PyExc_RuntimeError
,
NULL
,
NULL
);
if
(
!
PyExc_RecursionErrorInst
)
Py_FatalError
(
"Cannot pre-allocate RuntimeError instance for "
"recursion errors"
);
else
{
PyBaseExceptionObject
*
err_inst
=
(
PyBaseExceptionObject
*
)
PyExc_RecursionErrorInst
;
PyObject
*
args_tuple
;
PyObject
*
exc_message
;
exc_message
=
PyUnicode_FromString
(
"maximum recursion depth exceeded"
);
if
(
!
exc_message
)
Py_FatalError
(
"cannot allocate argument for RuntimeError "
"pre-allocation"
);
args_tuple
=
PyTuple_Pack
(
1
,
exc_message
);
if
(
!
args_tuple
)
Py_FatalError
(
"cannot allocate tuple for RuntimeError "
"pre-allocation"
);
Py_DECREF
(
exc_message
);
if
(
BaseException_init
(
err_inst
,
args_tuple
,
NULL
))
Py_FatalError
(
"init of pre-allocated RuntimeError failed"
);
Py_DECREF
(
args_tuple
);
}
}
Py_DECREF
(
bltinmod
);
...
...
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