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
1ee99d31
Kaydet (Commit)
1ee99d31
authored
Agu 04, 2002
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make pgen compile with pydebug. Duplicate normalized names, as it may
be longer than the old string.
üst
cd280fb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
tokenizer.c
Parser/tokenizer.c
+6
-2
tokenizer.h
Parser/tokenizer.h
+2
-0
No files found.
Parser/tokenizer.c
Dosyayı görüntüle @
1ee99d31
...
@@ -128,8 +128,10 @@ tok_new(void)
...
@@ -128,8 +128,10 @@ tok_new(void)
tok
->
read_coding_spec
=
0
;
tok
->
read_coding_spec
=
0
;
tok
->
issued_encoding_warning
=
0
;
tok
->
issued_encoding_warning
=
0
;
tok
->
encoding
=
NULL
;
tok
->
encoding
=
NULL
;
#ifndef PGEN
tok
->
decoding_readline
=
NULL
;
tok
->
decoding_readline
=
NULL
;
tok
->
decoding_buffer
=
NULL
;
tok
->
decoding_buffer
=
NULL
;
#endif
return
tok
;
return
tok
;
}
}
...
@@ -225,8 +227,8 @@ get_coding_spec(const char *s, int size)
...
@@ -225,8 +227,8 @@ get_coding_spec(const char *s, int size)
char
*
r
=
new_string
(
begin
,
t
-
begin
);
char
*
r
=
new_string
(
begin
,
t
-
begin
);
char
*
q
=
get_normal_name
(
r
);
char
*
q
=
get_normal_name
(
r
);
if
(
r
!=
q
)
{
if
(
r
!=
q
)
{
assert
(
strlen
(
r
)
>=
strlen
(
q
)
);
PyMem_DEL
(
r
);
strcpy
(
r
,
q
);
r
=
new_string
(
q
,
strlen
(
q
)
);
}
}
return
r
;
return
r
;
}
}
...
@@ -584,8 +586,10 @@ PyTokenizer_Free(struct tok_state *tok)
...
@@ -584,8 +586,10 @@ PyTokenizer_Free(struct tok_state *tok)
{
{
if
(
tok
->
encoding
!=
NULL
)
if
(
tok
->
encoding
!=
NULL
)
PyMem_DEL
(
tok
->
encoding
);
PyMem_DEL
(
tok
->
encoding
);
#ifndef PGEN
Py_XDECREF
(
tok
->
decoding_readline
);
Py_XDECREF
(
tok
->
decoding_readline
);
Py_XDECREF
(
tok
->
decoding_buffer
);
Py_XDECREF
(
tok
->
decoding_buffer
);
#endif
if
(
tok
->
fp
!=
NULL
&&
tok
->
buf
!=
NULL
)
if
(
tok
->
fp
!=
NULL
&&
tok
->
buf
!=
NULL
)
PyMem_DEL
(
tok
->
buf
);
PyMem_DEL
(
tok
->
buf
);
PyMem_DEL
(
tok
);
PyMem_DEL
(
tok
);
...
...
Parser/tokenizer.h
Dosyayı görüntüle @
1ee99d31
...
@@ -45,8 +45,10 @@ struct tok_state {
...
@@ -45,8 +45,10 @@ struct tok_state {
int
read_coding_spec
;
/* whether 'coding:...' has been read */
int
read_coding_spec
;
/* whether 'coding:...' has been read */
int
issued_encoding_warning
;
/* whether non-ASCII warning was issued */
int
issued_encoding_warning
;
/* whether non-ASCII warning was issued */
char
*
encoding
;
char
*
encoding
;
#ifndef PGEN
PyObject
*
decoding_readline
;
/* codecs.open(...).readline */
PyObject
*
decoding_readline
;
/* codecs.open(...).readline */
PyObject
*
decoding_buffer
;
PyObject
*
decoding_buffer
;
#endif
const
char
*
enc
;
const
char
*
enc
;
const
char
*
str
;
const
char
*
str
;
};
};
...
...
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