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
ee34ac12
Kaydet (Commit)
ee34ac12
authored
Şub 28, 2001
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Let's have some sanity. Introduce a helper to issue a symbol table
warning.
üst
58177b99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
compile.c
Python/compile.c
+17
-16
No files found.
Python/compile.c
Dosyayı görüntüle @
ee34ac12
...
...
@@ -3983,6 +3983,22 @@ get_ref_type(struct compiling *c, char *name)
return
-
1
;
/* can't get here */
}
/* Helper function to issue symbol table warnings */
static
void
symtable_warn
(
struct
symtable
*
st
,
char
*
msg
)
{
if
(
PyErr_WarnExplicit
(
PyExc_SyntaxWarning
,
msg
,
st
->
st_filename
,
st
->
st_cur
->
ste_lineno
,
NULL
,
NULL
)
<
0
)
{
if
(
PyErr_ExceptionMatches
(
PyExc_SyntaxWarning
))
{
PyErr_SetString
(
PyExc_SyntaxError
,
msg
);
PyErr_SyntaxLocation
(
st
->
st_filename
,
st
->
st_cur
->
ste_lineno
);
}
st
->
st_errors
++
;
}
}
/* Helper function for setting lineno and filename */
static
int
...
...
@@ -4837,22 +4853,7 @@ symtable_global(struct symtable *st, node *n)
name
);
else
sprintf
(
buf
,
GLOBAL_AFTER_USE
,
name
);
if
(
PyErr_WarnExplicit
(
PyExc_SyntaxWarning
,
buf
,
st
->
st_filename
,
st
->
st_cur
->
ste_lineno
,
NULL
,
NULL
)
<
0
)
{
if
(
PyErr_ExceptionMatches
(
PyExc_SyntaxWarning
))
{
PyErr_SetString
(
PyExc_SyntaxError
,
buf
);
PyErr_SyntaxLocation
(
st
->
st_filename
,
st
->
st_cur
->
ste_lineno
);
}
st
->
st_errors
++
;
}
symtable_warn
(
st
,
buf
);
}
}
symtable_add_def
(
st
,
name
,
DEF_GLOBAL
);
...
...
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