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
9e77f72f
Kaydet (Commit)
9e77f72f
authored
May 07, 2015
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
shorten capsule name macro; it doesn't need to be so long
üst
ad643b59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
compile.c
Python/compile.c
+4
-4
No files found.
Python/compile.c
Dosyayı görüntüle @
9e77f72f
...
...
@@ -206,7 +206,7 @@ static int compiler_set_qualname(struct compiler *);
static
PyCodeObject
*
assemble
(
struct
compiler
*
,
int
addNone
);
static
PyObject
*
__doc__
;
#define C
OMPILER_CAPSULE_NAME_COMPILER_UNIT
"compile.c compiler unit"
#define C
APSULE_NAME
"compile.c compiler unit"
PyObject
*
_Py_Mangle
(
PyObject
*
privateobj
,
PyObject
*
ident
)
...
...
@@ -608,7 +608,7 @@ compiler_enter_scope(struct compiler *c, identifier name,
/* Push the old compiler_unit on the stack. */
if
(
c
->
u
)
{
PyObject
*
capsule
=
PyCapsule_New
(
c
->
u
,
C
OMPILER_CAPSULE_NAME_COMPILER_UNIT
,
NULL
);
PyObject
*
capsule
=
PyCapsule_New
(
c
->
u
,
C
APSULE_NAME
,
NULL
);
if
(
!
capsule
||
PyList_Append
(
c
->
c_stack
,
capsule
)
<
0
)
{
Py_XDECREF
(
capsule
);
compiler_unit_free
(
u
);
...
...
@@ -644,7 +644,7 @@ compiler_exit_scope(struct compiler *c)
n
=
PyList_GET_SIZE
(
c
->
c_stack
)
-
1
;
if
(
n
>=
0
)
{
capsule
=
PyList_GET_ITEM
(
c
->
c_stack
,
n
);
c
->
u
=
(
struct
compiler_unit
*
)
PyCapsule_GetPointer
(
capsule
,
C
OMPILER_CAPSULE_NAME_COMPILER_UNIT
);
c
->
u
=
(
struct
compiler_unit
*
)
PyCapsule_GetPointer
(
capsule
,
C
APSULE_NAME
);
assert
(
c
->
u
);
/* we are deleting from a list so this really shouldn't fail */
if
(
PySequence_DelItem
(
c
->
c_stack
,
n
)
<
0
)
...
...
@@ -674,7 +674,7 @@ compiler_set_qualname(struct compiler *c)
PyObject
*
mangled
,
*
capsule
;
capsule
=
PyList_GET_ITEM
(
c
->
c_stack
,
stack_size
-
1
);
parent
=
(
struct
compiler_unit
*
)
PyCapsule_GetPointer
(
capsule
,
C
OMPILER_CAPSULE_NAME_COMPILER_UNIT
);
parent
=
(
struct
compiler_unit
*
)
PyCapsule_GetPointer
(
capsule
,
C
APSULE_NAME
);
assert
(
parent
);
if
(
u
->
u_scope_type
==
COMPILER_SCOPE_FUNCTION
||
u
->
u_scope_type
==
COMPILER_SCOPE_CLASS
)
{
...
...
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