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
7d66b00f
Kaydet (Commit)
7d66b00f
authored
Tem 10, 2005
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Whitespace normalization.
üst
9a3240e8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
29 deletions
+29
-29
bgenBuffer.py
Tools/bgen/bgen/bgenBuffer.py
+15
-15
bgenGenerator.py
Tools/bgen/bgen/bgenGenerator.py
+2
-2
bgenHeapBuffer.py
Tools/bgen/bgen/bgenHeapBuffer.py
+2
-2
bgenObjectDefinition.py
Tools/bgen/bgen/bgenObjectDefinition.py
+1
-1
bgenType.py
Tools/bgen/bgen/bgenType.py
+5
-5
bgenVariable.py
Tools/bgen/bgen/bgenVariable.py
+3
-3
scantools.py
Tools/bgen/bgen/scantools.py
+1
-1
No files found.
Tools/bgen/bgen/bgenBuffer.py
Dosyayı görüntüle @
7d66b00f
...
...
@@ -41,23 +41,23 @@ class FixedInputOutputBufferType(InputOnlyType):
def
getArgDeclarations
(
self
,
name
,
reference
=
False
,
constmode
=
False
):
if
reference
:
raise
RuntimeError
,
"Cannot pass buffer types by reference"
return
(
self
.
getBufferDeclarations
(
name
,
constmode
)
+
return
(
self
.
getBufferDeclarations
(
name
,
constmode
)
+
self
.
getSizeDeclarations
(
name
))
def
getBufferDeclarations
(
self
,
name
,
constmode
=
False
):
return
self
.
getInputBufferDeclarations
(
name
,
constmode
)
+
\
self
.
getOutputBufferDeclarations
(
name
,
constmode
)
self
.
getOutputBufferDeclarations
(
name
,
constmode
)
def
getInputBufferDeclarations
(
self
,
name
,
constmode
=
False
):
if
constmode
:
const
=
"const "
else
:
const
=
""
if
constmode
:
const
=
"const "
else
:
const
=
""
return
[
"
%
s
%
s *
%
s__in__"
%
(
const
,
self
.
datatype
,
name
)]
def
getOutputBufferDeclarations
(
self
,
name
,
constmode
=
False
):
if
constmode
:
raise
RuntimeError
,
"Cannot use const output buffer"
if
constmode
:
raise
RuntimeError
,
"Cannot use const output buffer"
return
[
"
%
s
%
s__out__[
%
s]"
%
(
self
.
datatype
,
name
,
self
.
size
)]
def
getSizeDeclarations
(
self
,
name
):
...
...
@@ -194,21 +194,21 @@ class StructInputOutputBufferType(FixedInputOutputBufferType):
self
.
typeName
=
self
.
type
=
type
def
getInputBufferDeclarations
(
self
,
name
,
constmode
=
False
):
if
constmode
:
const
=
"const "
else
:
const
=
""
if
constmode
:
const
=
"const "
else
:
const
=
""
return
[
"
%
s
%
s *
%
s__in__"
%
(
const
,
self
.
type
,
name
)]
def
getSizeDeclarations
(
self
,
name
):
return
[]
def
getAuxDeclarations
(
self
,
name
):
return
[
"int
%
s__in_len__"
%
(
name
)]
def
getOutputBufferDeclarations
(
self
,
name
,
constmode
=
False
):
if
constmode
:
raise
RuntimeError
,
"Cannot use const output buffer"
if
constmode
:
raise
RuntimeError
,
"Cannot use const output buffer"
return
[
"
%
s
%
s__out__"
%
(
self
.
type
,
name
)]
def
getargsArgs
(
self
,
name
):
...
...
Tools/bgen/bgen/bgenGenerator.py
Dosyayı görüntüle @
7d66b00f
...
...
@@ -32,7 +32,7 @@ class BaseFunctionGenerator:
def
checkgenerate
(
self
):
return
True
def
generate
(
self
):
if
not
self
.
checkgenerate
():
return
...
...
@@ -234,7 +234,7 @@ class FunctionGenerator(BaseFunctionGenerator):
return
"
%
s = "
%
self
.
rv
.
name
else
:
return
""
def
checkit
(
self
):
for
arg
in
self
.
argumentList
:
arg
.
errorCheck
()
...
...
Tools/bgen/bgen/bgenHeapBuffer.py
Dosyayı görüntüle @
7d66b00f
...
...
@@ -17,8 +17,8 @@ class HeapInputOutputBufferType(FixedInputOutputBufferType):
FixedInputOutputBufferType
.
__init__
(
self
,
"0"
,
datatype
,
sizetype
,
sizeformat
)
def
getOutputBufferDeclarations
(
self
,
name
,
constmode
=
False
):
if
constmode
:
raise
RuntimeError
,
"Cannot use const output buffer"
if
constmode
:
raise
RuntimeError
,
"Cannot use const output buffer"
return
[
"
%
s *
%
s__out__"
%
(
self
.
datatype
,
name
)]
def
getargsCheck
(
self
,
name
):
...
...
Tools/bgen/bgen/bgenObjectDefinition.py
Dosyayı görüntüle @
7d66b00f
...
...
@@ -220,7 +220,7 @@ class ObjectDefinition(GeneratorGroup):
Output
(
"""Py_INCREF(&
%
s);"""
,
self
.
typename
)
Output
(
"PyModule_AddObject(m,
\"
%
s
\"
, (PyObject *)&
%
s);"
,
self
.
name
,
self
.
typename
);
self
.
outputTypeObjectInitializerCompat
()
def
outputTypeObjectInitializerCompat
(
self
):
Output
(
"/* Backward-compatible name */"
)
Output
(
"""Py_INCREF(&
%
s);"""
,
self
.
typename
);
...
...
Tools/bgen/bgen/bgenType.py
Dosyayı görüntüle @
7d66b00f
...
...
@@ -47,7 +47,7 @@ class Type:
type, such as helper variables used to hold sizes, etc. These declarations
are not part of the C/C++ function call interface."""
return
[]
def
getargs
(
self
):
return
self
.
getargsFormat
(),
self
.
getargsArgs
()
...
...
@@ -68,10 +68,10 @@ class Type:
def
getargsPreCheck
(
self
,
name
):
"""Perform any actions needed before calling getargs().
This could include declaring temporary variables and such.
"""
def
getargsCheck
(
self
,
name
):
"""Perform any needed post-[new]getargs() checks.
...
...
@@ -133,10 +133,10 @@ class Type:
def
mkvaluePreCheck
(
self
,
name
):
"""Perform any actions needed before calling mkvalue().
This could include declaring temporary variables and such.
"""
def
cleanup
(
self
,
name
):
"""Clean up if necessary.
...
...
Tools/bgen/bgen/bgenVariable.py
Dosyayı görüntüle @
7d66b00f
...
...
@@ -48,10 +48,10 @@ class Variable:
def
getArgDeclarations
(
self
,
constmode
=
False
):
refmode
=
(
self
.
flags
&
RefMode
)
if
constmode
:
constmode
=
(
self
.
flags
&
ConstMode
)
constmode
=
(
self
.
flags
&
ConstMode
)
return
self
.
type
.
getArgDeclarations
(
self
.
name
,
reference
=
refmode
,
constmode
=
constmode
)
reference
=
refmode
,
constmode
=
constmode
)
def
getAuxDeclarations
(
self
):
return
self
.
type
.
getAuxDeclarations
(
self
.
name
)
...
...
Tools/bgen/bgen/scantools.py
Dosyayı görüntüle @
7d66b00f
...
...
@@ -626,7 +626,7 @@ if missing: raise "Missing Types"
def
destination
(
self
,
type
,
name
,
arglist
):
return
"FunctionGenerator"
,
"functions"
def
generatemodifiers
(
self
,
classname
,
name
,
modifiers
):
pass
...
...
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