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
6576bd84
Kaydet (Commit)
6576bd84
authored
Kas 13, 2005
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Prevent name pollution by making lots of internal functions static.
üst
f6a90445
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
35 deletions
+35
-35
Python-ast.h
Include/Python-ast.h
+1
-15
setobject.c
Objects/setobject.c
+1
-1
asdl_c.py
Parser/asdl_c.py
+4
-4
Python-ast.c
Python/Python-ast.c
+28
-14
future.c
Python/future.c
+1
-1
No files found.
Include/Python-ast.h
Dosyayı görüntüle @
6576bd84
/* File automatically generated by .
.
/Parser/asdl_c.py */
/* File automatically generated by ./Parser/asdl_c.py */
#include "asdl.h"
...
...
@@ -402,17 +402,3 @@ void free_excepthandler(excepthandler_ty);
void
free_arguments
(
arguments_ty
);
void
free_keyword
(
keyword_ty
);
void
free_alias
(
alias_ty
);
int
marshal_write_mod
(
PyObject
**
,
int
*
,
mod_ty
);
int
marshal_write_stmt
(
PyObject
**
,
int
*
,
stmt_ty
);
int
marshal_write_expr
(
PyObject
**
,
int
*
,
expr_ty
);
int
marshal_write_expr_context
(
PyObject
**
,
int
*
,
expr_context_ty
);
int
marshal_write_slice
(
PyObject
**
,
int
*
,
slice_ty
);
int
marshal_write_boolop
(
PyObject
**
,
int
*
,
boolop_ty
);
int
marshal_write_operator
(
PyObject
**
,
int
*
,
operator_ty
);
int
marshal_write_unaryop
(
PyObject
**
,
int
*
,
unaryop_ty
);
int
marshal_write_cmpop
(
PyObject
**
,
int
*
,
cmpop_ty
);
int
marshal_write_comprehension
(
PyObject
**
,
int
*
,
comprehension_ty
);
int
marshal_write_excepthandler
(
PyObject
**
,
int
*
,
excepthandler_ty
);
int
marshal_write_arguments
(
PyObject
**
,
int
*
,
arguments_ty
);
int
marshal_write_keyword
(
PyObject
**
,
int
*
,
keyword_ty
);
int
marshal_write_alias
(
PyObject
**
,
int
*
,
alias_ty
);
Objects/setobject.c
Dosyayı görüntüle @
6576bd84
...
...
@@ -1214,7 +1214,7 @@ set_iand(PySetObject *so, PyObject *other)
return
(
PyObject
*
)
so
;
}
int
static
int
set_difference_update_internal
(
PySetObject
*
so
,
PyObject
*
other
)
{
if
((
PyObject
*
)
so
==
other
)
...
...
Parser/asdl_c.py
Dosyayı görüntüle @
6576bd84
...
...
@@ -334,7 +334,7 @@ class MarshalPrototypeVisitor(PickleVisitor):
def
prototype
(
self
,
sum
,
name
):
ctype
=
get_c_type
(
name
)
self
.
emit
(
"int marshal_write_
%
s(PyObject **, int *,
%
s);"
self
.
emit
(
"
static
int marshal_write_
%
s(PyObject **, int *,
%
s);"
%
(
name
,
ctype
),
0
)
visitProduct
=
visitSum
=
prototype
...
...
@@ -487,7 +487,7 @@ class MarshalFunctionVisitor(PickleVisitor):
def
func_begin
(
self
,
name
,
has_seq
):
ctype
=
get_c_type
(
name
)
self
.
emit
(
"int"
,
0
)
self
.
emit
(
"
static
int"
,
0
)
self
.
emit
(
"marshal_write_
%
s(PyObject **buf, int *off,
%
s o)"
%
(
name
,
ctype
),
0
)
self
.
emit
(
"{"
,
0
)
...
...
@@ -580,7 +580,6 @@ def main(srcfile):
StructVisitor
(
f
),
PrototypeVisitor
(
f
),
FreePrototypeVisitor
(
f
),
MarshalPrototypeVisitor
(
f
),
)
c
.
visit
(
mod
)
f
.
close
()
...
...
@@ -594,7 +593,8 @@ def main(srcfile):
print
>>
f
,
'#include "Python.h"'
print
>>
f
,
'#include "
%
s-ast.h"'
%
mod
.
name
print
>>
f
v
=
ChainOfVisitors
(
FunctionVisitor
(
f
),
v
=
ChainOfVisitors
(
MarshalPrototypeVisitor
(
f
),
FunctionVisitor
(
f
),
StaticVisitor
(
f
),
FreeVisitor
(
f
),
MarshalFunctionVisitor
(
f
),
...
...
Python/Python-ast.c
Dosyayı görüntüle @
6576bd84
...
...
@@ -3,6 +3,20 @@
#include "Python.h"
#include "Python-ast.h"
static
int
marshal_write_mod
(
PyObject
**
,
int
*
,
mod_ty
);
static
int
marshal_write_stmt
(
PyObject
**
,
int
*
,
stmt_ty
);
static
int
marshal_write_expr
(
PyObject
**
,
int
*
,
expr_ty
);
static
int
marshal_write_expr_context
(
PyObject
**
,
int
*
,
expr_context_ty
);
static
int
marshal_write_slice
(
PyObject
**
,
int
*
,
slice_ty
);
static
int
marshal_write_boolop
(
PyObject
**
,
int
*
,
boolop_ty
);
static
int
marshal_write_operator
(
PyObject
**
,
int
*
,
operator_ty
);
static
int
marshal_write_unaryop
(
PyObject
**
,
int
*
,
unaryop_ty
);
static
int
marshal_write_cmpop
(
PyObject
**
,
int
*
,
cmpop_ty
);
static
int
marshal_write_comprehension
(
PyObject
**
,
int
*
,
comprehension_ty
);
static
int
marshal_write_excepthandler
(
PyObject
**
,
int
*
,
excepthandler_ty
);
static
int
marshal_write_arguments
(
PyObject
**
,
int
*
,
arguments_ty
);
static
int
marshal_write_keyword
(
PyObject
**
,
int
*
,
keyword_ty
);
static
int
marshal_write_alias
(
PyObject
**
,
int
*
,
alias_ty
);
mod_ty
Module
(
asdl_seq
*
body
)
{
...
...
@@ -1519,7 +1533,7 @@ free_alias(alias_ty o)
free
(
o
);
}
int
static
int
marshal_write_mod
(
PyObject
**
buf
,
int
*
off
,
mod_ty
o
)
{
int
i
;
...
...
@@ -1557,7 +1571,7 @@ marshal_write_mod(PyObject **buf, int *off, mod_ty o)
return
1
;
}
int
static
int
marshal_write_stmt
(
PyObject
**
buf
,
int
*
off
,
stmt_ty
o
)
{
int
i
;
...
...
@@ -1818,7 +1832,7 @@ marshal_write_stmt(PyObject **buf, int *off, stmt_ty o)
return
1
;
}
int
static
int
marshal_write_expr
(
PyObject
**
buf
,
int
*
off
,
expr_ty
o
)
{
int
i
;
...
...
@@ -1989,7 +2003,7 @@ marshal_write_expr(PyObject **buf, int *off, expr_ty o)
return
1
;
}
int
static
int
marshal_write_expr_context
(
PyObject
**
buf
,
int
*
off
,
expr_context_ty
o
)
{
switch
(
o
)
{
...
...
@@ -2015,7 +2029,7 @@ marshal_write_expr_context(PyObject **buf, int *off, expr_context_ty o)
return
1
;
}
int
static
int
marshal_write_slice
(
PyObject
**
buf
,
int
*
off
,
slice_ty
o
)
{
int
i
;
...
...
@@ -2063,7 +2077,7 @@ marshal_write_slice(PyObject **buf, int *off, slice_ty o)
return
1
;
}
int
static
int
marshal_write_boolop
(
PyObject
**
buf
,
int
*
off
,
boolop_ty
o
)
{
switch
(
o
)
{
...
...
@@ -2077,7 +2091,7 @@ marshal_write_boolop(PyObject **buf, int *off, boolop_ty o)
return
1
;
}
int
static
int
marshal_write_operator
(
PyObject
**
buf
,
int
*
off
,
operator_ty
o
)
{
switch
(
o
)
{
...
...
@@ -2121,7 +2135,7 @@ marshal_write_operator(PyObject **buf, int *off, operator_ty o)
return
1
;
}
int
static
int
marshal_write_unaryop
(
PyObject
**
buf
,
int
*
off
,
unaryop_ty
o
)
{
switch
(
o
)
{
...
...
@@ -2141,7 +2155,7 @@ marshal_write_unaryop(PyObject **buf, int *off, unaryop_ty o)
return
1
;
}
int
static
int
marshal_write_cmpop
(
PyObject
**
buf
,
int
*
off
,
cmpop_ty
o
)
{
switch
(
o
)
{
...
...
@@ -2179,7 +2193,7 @@ marshal_write_cmpop(PyObject **buf, int *off, cmpop_ty o)
return
1
;
}
int
static
int
marshal_write_comprehension
(
PyObject
**
buf
,
int
*
off
,
comprehension_ty
o
)
{
int
i
;
...
...
@@ -2193,7 +2207,7 @@ marshal_write_comprehension(PyObject **buf, int *off, comprehension_ty o)
return
1
;
}
int
static
int
marshal_write_excepthandler
(
PyObject
**
buf
,
int
*
off
,
excepthandler_ty
o
)
{
int
i
;
...
...
@@ -2219,7 +2233,7 @@ marshal_write_excepthandler(PyObject **buf, int *off, excepthandler_ty o)
return
1
;
}
int
static
int
marshal_write_arguments
(
PyObject
**
buf
,
int
*
off
,
arguments_ty
o
)
{
int
i
;
...
...
@@ -2250,7 +2264,7 @@ marshal_write_arguments(PyObject **buf, int *off, arguments_ty o)
return
1
;
}
int
static
int
marshal_write_keyword
(
PyObject
**
buf
,
int
*
off
,
keyword_ty
o
)
{
marshal_write_identifier
(
buf
,
off
,
o
->
arg
);
...
...
@@ -2258,7 +2272,7 @@ marshal_write_keyword(PyObject **buf, int *off, keyword_ty o)
return
1
;
}
int
static
int
marshal_write_alias
(
PyObject
**
buf
,
int
*
off
,
alias_ty
o
)
{
marshal_write_identifier
(
buf
,
off
,
o
->
name
);
...
...
Python/future.c
Dosyayı görüntüle @
6576bd84
...
...
@@ -46,7 +46,7 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename)
return
1
;
}
int
static
int
future_parse
(
PyFutureFeatures
*
ff
,
mod_ty
mod
,
const
char
*
filename
)
{
int
i
,
found_docstring
=
0
,
done
=
0
,
prev_line
=
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