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
2c55c597
Kaydet (Commit)
2c55c597
authored
Mar 30, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make _fields attr for no fields consistent with _attributes attr.
üst
ebc8dedd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
16 deletions
+9
-16
test_ast.py
Lib/test/test_ast.py
+3
-0
asdl_c.py
Parser/asdl_c.py
+3
-8
Python-ast.c
Python/Python-ast.c
+3
-8
No files found.
Lib/test/test_ast.py
Dosyayı görüntüle @
2c55c597
...
@@ -163,6 +163,9 @@ class AST_Tests(unittest.TestCase):
...
@@ -163,6 +163,9 @@ class AST_Tests(unittest.TestCase):
self
.
assertEquals
(
x
.
right
,
3
)
self
.
assertEquals
(
x
.
right
,
3
)
self
.
assertEquals
(
x
.
lineno
,
0
)
self
.
assertEquals
(
x
.
lineno
,
0
)
# this used to fail because Sub._fields was None
x
=
_ast
.
Sub
()
def
test_main
():
def
test_main
():
test_support
.
run_unittest
(
AST_Tests
)
test_support
.
run_unittest
(
AST_Tests
)
...
...
Parser/asdl_c.py
Dosyayı görüntüle @
2c55c597
...
@@ -674,14 +674,9 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int
...
@@ -674,14 +674,9 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int
{
{
PyObject *fnames, *result;
PyObject *fnames, *result;
int i;
int i;
if (num_fields) {
fnames = PyTuple_New(num_fields);
fnames = PyTuple_New(num_fields);
if (!fnames) return NULL;
if (!fnames) return NULL;
for (i = 0; i < num_fields; i++) {
} else {
fnames = Py_None;
Py_INCREF(Py_None);
}
for(i=0; i < num_fields; i++) {
PyObject *field = PyString_FromString(fields[i]);
PyObject *field = PyString_FromString(fields[i]);
if (!field) {
if (!field) {
Py_DECREF(fnames);
Py_DECREF(fnames);
...
...
Python/Python-ast.c
Dosyayı görüntüle @
2c55c597
...
@@ -465,14 +465,9 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int
...
@@ -465,14 +465,9 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int
{
{
PyObject
*
fnames
,
*
result
;
PyObject
*
fnames
,
*
result
;
int
i
;
int
i
;
if
(
num_fields
)
{
fnames
=
PyTuple_New
(
num_fields
);
fnames
=
PyTuple_New
(
num_fields
);
if
(
!
fnames
)
return
NULL
;
if
(
!
fnames
)
return
NULL
;
for
(
i
=
0
;
i
<
num_fields
;
i
++
)
{
}
else
{
fnames
=
Py_None
;
Py_INCREF
(
Py_None
);
}
for
(
i
=
0
;
i
<
num_fields
;
i
++
)
{
PyObject
*
field
=
PyString_FromString
(
fields
[
i
]);
PyObject
*
field
=
PyString_FromString
(
fields
[
i
]);
if
(
!
field
)
{
if
(
!
field
)
{
Py_DECREF
(
fnames
);
Py_DECREF
(
fnames
);
...
...
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