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
4903e001
Kaydet (Commit)
4903e001
authored
Ock 18, 2014
tarafından
Larry Hastings
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #20292: Small bug fix for Argument Clinic supporting format units
for strings with explicit encodings.
üst
3c16c1d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
clinic.py
Tools/clinic/clinic.py
+5
-1
No files found.
Tools/clinic/clinic.py
Dosyayı görüntüle @
4903e001
...
@@ -126,6 +126,10 @@ def quoted_for_c_string(s):
...
@@ -126,6 +126,10 @@ def quoted_for_c_string(s):
s
=
s
.
replace
(
old
,
new
)
s
=
s
.
replace
(
old
,
new
)
return
s
return
s
def
c_repr
(
s
):
return
'"'
+
s
+
'"'
is_legal_c_identifier
=
re
.
compile
(
'^[A-Za-z_][A-Za-z0-9_]*$'
)
.
match
is_legal_c_identifier
=
re
.
compile
(
'^[A-Za-z_][A-Za-z0-9_]*$'
)
.
match
def
is_legal_py_identifier
(
s
):
def
is_legal_py_identifier
(
s
):
...
@@ -3129,7 +3133,7 @@ class DSLParser:
...
@@ -3129,7 +3133,7 @@ class DSLParser:
if
isinstance
(
value
,
(
bool
,
None
.
__class__
)):
if
isinstance
(
value
,
(
bool
,
None
.
__class__
)):
c_default
=
"Py_"
+
py_default
c_default
=
"Py_"
+
py_default
elif
isinstance
(
value
,
str
):
elif
isinstance
(
value
,
str
):
c_default
=
'"'
+
quoted_for_c_string
(
value
)
+
'"'
c_default
=
c_repr
(
value
)
else
:
else
:
c_default
=
py_default
c_default
=
py_default
...
...
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