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
2ab0ae6a
Kaydet (Commit)
2ab0ae6a
authored
Haz 16, 2005
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More factorization.
üst
8966d3de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
bgenType.py
Tools/bgen/bgen/bgenType.py
+9
-3
bgenVariable.py
Tools/bgen/bgen/bgenVariable.py
+5
-0
No files found.
Tools/bgen/bgen/bgenType.py
Dosyayı görüntüle @
2ab0ae6a
...
...
@@ -24,11 +24,16 @@ class Type:
Example: int.declare('spam') prints "int spam;"
"""
Output
(
"
%
s;"
,
self
.
getDeclaration
(
name
,
reference
))
def
getDeclaration
(
self
,
name
,
reference
=
False
):
"""Return a string declaring a variable or argument, without
any syntactic adornment"""
if
reference
:
Output
(
"
%
s&
%
s;"
,
self
.
typeName
,
name
)
return
"
%
s&
%
s"
%
(
self
.
typeName
,
name
)
else
:
Output
(
"
%
s
%
s;"
,
self
.
typeName
,
name
)
return
"
%
s
%
s"
%
(
self
.
typeName
,
name
)
def
getargs
(
self
):
return
self
.
getargsFormat
(),
self
.
getargsArgs
()
...
...
@@ -72,6 +77,7 @@ class Type:
Default is to call passInput().
"""
return
self
.
passInput
(
name
)
def
errorCheck
(
self
,
name
):
"""Check for an error returned in the variable.
...
...
Tools/bgen/bgen/bgenVariable.py
Dosyayı görüntüle @
2ab0ae6a
...
...
@@ -43,6 +43,11 @@ class Variable:
self
.
type
.
declare
(
self
.
name
,
reference
=
True
)
elif
self
.
flags
!=
SelfMode
:
self
.
type
.
declare
(
self
.
name
)
def
getDeclaration
(
self
):
"""Return the unadorned declaration of the variable,
suitable for use in a formal parameter list."""
return
self
.
type
.
getDeclaration
(
self
.
name
)
def
getargsFormat
(
self
):
"""Call the type's getargsFormatmethod."""
...
...
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