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
fa56e2dc
Kaydet (Commit)
fa56e2dc
authored
Ock 19, 2003
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF # 669553, fix memory (ref) leaks
Will backport.
üst
f4ca5a2f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
14 deletions
+33
-14
pyexpat.c
Modules/pyexpat.c
+25
-13
intobject.c
Objects/intobject.c
+8
-1
No files found.
Modules/pyexpat.c
Dosyayı görüntüle @
fa56e2dc
...
...
@@ -1332,24 +1332,36 @@ xmlparse_getattr(xmlparseobject *self, char *name)
}
}
#define APPEND(list, str) \
do { \
PyObject *o = PyString_FromString(str); \
if (o != NULL) \
PyList_Append(list, o); \
Py_XDECREF(o); \
} while (0)
if
(
strcmp
(
name
,
"__members__"
)
==
0
)
{
int
i
;
PyObject
*
rc
=
PyList_New
(
0
);
for
(
i
=
0
;
handler_info
[
i
].
name
!=
NULL
;
i
++
)
{
PyList_Append
(
rc
,
get_handler_name
(
&
handler_info
[
i
]));
PyObject
*
o
=
get_handler_name
(
&
handler_info
[
i
]);
if
(
o
!=
NULL
)
PyList_Append
(
rc
,
o
);
Py_XDECREF
(
o
);
}
PyList_Append
(
rc
,
PyString_FromString
(
"ErrorCode"
));
PyList_Append
(
rc
,
PyString_FromString
(
"ErrorLineNumber"
));
PyList_Append
(
rc
,
PyString_FromString
(
"ErrorColumnNumber"
));
PyList_Append
(
rc
,
PyString_FromString
(
"ErrorByteIndex"
));
PyList_Append
(
rc
,
PyString_FromString
(
"buffer_size"
));
PyList_Append
(
rc
,
PyString_FromString
(
"buffer_text"
));
PyList_Append
(
rc
,
PyString_FromString
(
"buffer_used"
));
PyList_Append
(
rc
,
PyString_FromString
(
"ordered_attributes"
));
PyList_Append
(
rc
,
PyString_FromString
(
"returns_unicode"
));
PyList_Append
(
rc
,
PyString_FromString
(
"specified_attributes"
));
PyList_Append
(
rc
,
PyString_FromString
(
"intern"
));
APPEND
(
rc
,
"ErrorCode"
);
APPEND
(
rc
,
"ErrorLineNumber"
);
APPEND
(
rc
,
"ErrorColumnNumber"
);
APPEND
(
rc
,
"ErrorByteIndex"
);
APPEND
(
rc
,
"buffer_size"
);
APPEND
(
rc
,
"buffer_text"
);
APPEND
(
rc
,
"buffer_used"
);
APPEND
(
rc
,
"ordered_attributes"
);
APPEND
(
rc
,
"returns_unicode"
);
APPEND
(
rc
,
"specified_attributes"
);
APPEND
(
rc
,
"intern"
);
#undef APPEND
return
rc
;
}
return
Py_FindMethod
(
xmlparse_methods
,
(
PyObject
*
)
self
,
name
);
...
...
Objects/intobject.c
Dosyayı görüntüle @
fa56e2dc
...
...
@@ -606,9 +606,16 @@ int_neg(PyIntObject *v)
a
=
v
->
ob_ival
;
x
=
-
a
;
if
(
a
<
0
&&
x
<
0
)
{
PyObject
*
o
;
if
(
err_ovf
(
"integer negation"
))
return
NULL
;
return
PyNumber_Negative
(
PyLong_FromLong
(
a
));
o
=
PyLong_FromLong
(
a
);
if
(
o
!=
NULL
)
{
PyObject
*
result
=
PyNumber_Negative
(
o
);
Py_DECREF
(
o
);
return
result
;
}
return
NULL
;
}
return
PyInt_FromLong
(
x
);
}
...
...
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