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
fa968ac3
Kaydet (Commit)
fa968ac3
authored
Eyl 30, 1999
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patches by Jack Jansen: new type OptionalInBuffer allows
passing either a string/input buffer or None.
üst
8bd73827
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
bgenBuffer.py
Tools/bgen/bgen/bgenBuffer.py
+13
-1
macsupport.py
Tools/bgen/bgen/macsupport.py
+1
-0
No files found.
Tools/bgen/bgen/bgenBuffer.py
Dosyayı görüntüle @
fa968ac3
...
@@ -108,6 +108,14 @@ class OutputOnlyBufferMixIn(OutputOnlyMixIn):
...
@@ -108,6 +108,14 @@ class OutputOnlyBufferMixIn(OutputOnlyMixIn):
def
declareInputBuffer
(
self
,
name
):
def
declareInputBuffer
(
self
,
name
):
pass
pass
class
OptionalInputBufferMixIn
:
"""Add to input buffers if the buffer may be omitted: pass None in Python
and the C code will get a NULL pointer and zero size"""
def
getargsFormat
(
self
):
return
"z#"
class
FixedInputBufferType
(
InputOnlyBufferMixIn
,
FixedInputOutputBufferType
):
class
FixedInputBufferType
(
InputOnlyBufferMixIn
,
FixedInputOutputBufferType
):
...
@@ -119,6 +127,8 @@ class FixedInputBufferType(InputOnlyBufferMixIn, FixedInputOutputBufferType):
...
@@ -119,6 +127,8 @@ class FixedInputBufferType(InputOnlyBufferMixIn, FixedInputOutputBufferType):
def
passInput
(
self
,
name
):
def
passInput
(
self
,
name
):
return
"
%
s__in__"
%
name
return
"
%
s__in__"
%
name
class
OptionalFixedInputBufferType
(
OptionalInputBufferMixIn
,
FixedInputBufferType
):
pass
class
FixedOutputBufferType
(
OutputOnlyBufferMixIn
,
FixedInputOutputBufferType
):
class
FixedOutputBufferType
(
OutputOnlyBufferMixIn
,
FixedInputOutputBufferType
):
...
@@ -147,7 +157,9 @@ class VarInputBufferType(FixedInputBufferType):
...
@@ -147,7 +157,9 @@ class VarInputBufferType(FixedInputBufferType):
def
passInput
(
self
,
name
):
def
passInput
(
self
,
name
):
return
"
%
s__in__,
%
s__len__"
%
(
name
,
name
)
return
"
%
s__in__,
%
s__len__"
%
(
name
,
name
)
class
OptionalVarInputBufferType
(
OptionalInputBufferMixIn
,
VarInputBufferType
):
pass
# ----- PART 2: Structure buffers -----
# ----- PART 2: Structure buffers -----
...
...
Tools/bgen/bgen/macsupport.py
Dosyayı görüntüle @
fa968ac3
...
@@ -84,6 +84,7 @@ OSStatus = OSErrType("OSStatus", 'l')
...
@@ -84,6 +84,7 @@ OSStatus = OSErrType("OSStatus", 'l')
# Various buffer types
# Various buffer types
InBuffer
=
VarInputBufferType
(
'char'
,
'long'
,
'l'
)
# (buf, len)
InBuffer
=
VarInputBufferType
(
'char'
,
'long'
,
'l'
)
# (buf, len)
OptionalInBuffer
=
OptionalVarInputBufferType
(
'char'
,
'long'
,
'l'
)
# (buf, len)
InOutBuffer
=
HeapInputOutputBufferType
(
'char'
,
'long'
,
'l'
)
# (inbuf, outbuf, len)
InOutBuffer
=
HeapInputOutputBufferType
(
'char'
,
'long'
,
'l'
)
# (inbuf, outbuf, len)
VarInOutBuffer
=
VarHeapInputOutputBufferType
(
'char'
,
'long'
,
'l'
)
# (inbuf, outbuf, &len)
VarInOutBuffer
=
VarHeapInputOutputBufferType
(
'char'
,
'long'
,
'l'
)
# (inbuf, outbuf, &len)
...
...
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