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
11845e00
Kaydet (Commit)
11845e00
authored
Agu 05, 2002
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Be a lot less verbose by default.
üst
20417bcd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
bgenGenerator.py
Tools/bgen/bgen/bgenGenerator.py
+3
-2
scantools.py
Tools/bgen/bgen/scantools.py
+4
-4
No files found.
Tools/bgen/bgen/bgenGenerator.py
Dosyayı görüntüle @
11845e00
...
@@ -5,6 +5,7 @@ from bgenVariable import *
...
@@ -5,6 +5,7 @@ from bgenVariable import *
Error
=
"bgenGenerator.Error"
Error
=
"bgenGenerator.Error"
DEBUG
=
0
# Strings to specify argument transfer modes in generator calls
# Strings to specify argument transfer modes in generator calls
IN
=
"in"
IN
=
"in"
...
@@ -15,7 +16,7 @@ INOUT = IN_OUT = "in-out"
...
@@ -15,7 +16,7 @@ INOUT = IN_OUT = "in-out"
class
BaseFunctionGenerator
:
class
BaseFunctionGenerator
:
def
__init__
(
self
,
name
,
condition
=
None
):
def
__init__
(
self
,
name
,
condition
=
None
):
print
"<--"
,
name
if
DEBUG
:
print
"<--"
,
name
self
.
name
=
name
self
.
name
=
name
self
.
prefix
=
name
self
.
prefix
=
name
self
.
objecttype
=
"PyObject"
# Type of _self argument to function
self
.
objecttype
=
"PyObject"
# Type of _self argument to function
...
@@ -25,7 +26,7 @@ class BaseFunctionGenerator:
...
@@ -25,7 +26,7 @@ class BaseFunctionGenerator:
self
.
prefix
=
prefix
self
.
prefix
=
prefix
def
generate
(
self
):
def
generate
(
self
):
print
"-->"
,
self
.
name
if
DEBUG
:
print
"-->"
,
self
.
name
if
self
.
condition
:
if
self
.
condition
:
Output
()
Output
()
Output
(
self
.
condition
)
Output
(
self
.
condition
)
...
...
Tools/bgen/bgen/scantools.py
Dosyayı görüntüle @
11845e00
...
@@ -67,7 +67,7 @@ class Scanner:
...
@@ -67,7 +67,7 @@ class Scanner:
for
type
in
types
:
for
type
in
types
:
modes
=
self
.
usedtypes
[
type
]
.
keys
()
modes
=
self
.
usedtypes
[
type
]
.
keys
()
modes
.
sort
()
modes
.
sort
()
print
type
,
string
.
join
(
modes
)
self
.
report
(
"
%
s
%
s"
,
type
,
string
.
join
(
modes
)
)
def
gentypetest
(
self
,
file
):
def
gentypetest
(
self
,
file
):
fp
=
open
(
file
,
"w"
)
fp
=
open
(
file
,
"w"
)
...
@@ -89,7 +89,7 @@ if missing: raise "Missing Types"
...
@@ -89,7 +89,7 @@ if missing: raise "Missing Types"
fp
.
close
()
fp
.
close
()
def
initsilent
(
self
):
def
initsilent
(
self
):
self
.
silent
=
0
self
.
silent
=
1
def
error
(
self
,
format
,
*
args
):
def
error
(
self
,
format
,
*
args
):
if
self
.
silent
>=
0
:
if
self
.
silent
>=
0
:
...
@@ -486,7 +486,7 @@ if missing: raise "Missing Types"
...
@@ -486,7 +486,7 @@ if missing: raise "Missing Types"
return
return
self
.
report
(
"==>
%
s
%
s <=="
,
type
,
name
)
self
.
report
(
"==>
%
s
%
s <=="
,
type
,
name
)
if
self
.
blacklisted
(
type
,
name
):
if
self
.
blacklisted
(
type
,
name
):
self
.
error
(
"***
%
s
%
s blacklisted"
,
type
,
name
)
self
.
report
(
"***
%
s
%
s blacklisted"
,
type
,
name
)
return
return
returnlist
=
[(
type
,
name
,
'ReturnMode'
)]
returnlist
=
[(
type
,
name
,
'ReturnMode'
)]
returnlist
=
self
.
repairarglist
(
name
,
returnlist
)
returnlist
=
self
.
repairarglist
(
name
,
returnlist
)
...
@@ -496,7 +496,7 @@ if missing: raise "Missing Types"
...
@@ -496,7 +496,7 @@ if missing: raise "Missing Types"
if
self
.
unmanageable
(
type
,
name
,
arglist
):
if
self
.
unmanageable
(
type
,
name
,
arglist
):
##for arg in arglist:
##for arg in arglist:
## self.report(" %s", `arg`)
## self.report(" %s", `arg`)
self
.
error
(
"***
%
s
%
s unmanageable"
,
type
,
name
)
self
.
report
(
"***
%
s
%
s unmanageable"
,
type
,
name
)
return
return
self
.
alreadydone
.
append
(
name
)
self
.
alreadydone
.
append
(
name
)
self
.
generate
(
type
,
name
,
arglist
)
self
.
generate
(
type
,
name
,
arglist
)
...
...
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