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
420ed403
Kaydet (Commit)
420ed403
authored
Ara 31, 2001
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added support for the Carbon scrap manager (finally).
üst
76335936
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
_Scrapmodule.c
Mac/Modules/scrap/_Scrapmodule.c
+0
-0
scrapscan.py
Mac/Modules/scrap/scrapscan.py
+11
-2
scrapsupport.py
Mac/Modules/scrap/scrapsupport.py
+14
-0
No files found.
Mac/Modules/scrap/_Scrapmodule.c
Dosyayı görüntüle @
420ed403
This diff is collapsed.
Click to expand it.
Mac/Modules/scrap/scrapscan.py
Dosyayı görüntüle @
420ed403
...
@@ -5,7 +5,10 @@
...
@@ -5,7 +5,10 @@
import
sys
import
sys
import
os
import
os
BGENDIR
=
os
.
path
.
join
(
sys
.
prefix
,
':Tools:bgen:bgen'
)
if
os
.
sep
==
':'
:
BGENDIR
=
os
.
path
.
join
(
sys
.
prefix
,
':Tools:bgen:bgen'
)
else
:
BGENDIR
=
"../../../Tools/bgen/bgen"
sys
.
path
.
append
(
BGENDIR
)
sys
.
path
.
append
(
BGENDIR
)
from
scantools
import
Scanner
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
from
bgenlocations
import
TOOLBOXDIR
...
@@ -29,10 +32,16 @@ class MyScanner(Scanner):
...
@@ -29,10 +32,16 @@ class MyScanner(Scanner):
def
destination
(
self
,
type
,
name
,
arglist
):
def
destination
(
self
,
type
,
name
,
arglist
):
classname
=
"Function"
classname
=
"Function"
listname
=
"functions"
listname
=
"functions"
if
arglist
:
t
,
n
,
m
=
arglist
[
0
]
if
t
==
'ScrapRef'
and
m
==
"InMode"
:
classname
=
"Method"
listname
=
"methods"
return
classname
,
listname
return
classname
,
listname
def
makeblacklistnames
(
self
):
def
makeblacklistnames
(
self
):
return
[
return
[
"GetScrapFlavorInfoList"
,
]
]
def
makegreylist
(
self
):
def
makegreylist
(
self
):
...
@@ -50,7 +59,7 @@ class MyScanner(Scanner):
...
@@ -50,7 +59,7 @@ class MyScanner(Scanner):
def
makeblacklisttypes
(
self
):
def
makeblacklisttypes
(
self
):
return
[
return
[
"ScrapRef"
,
# For now -- This is the Carbon scrap main object
'ScrapPromiseKeeperUPP'
,
]
]
def
makerepairinstructions
(
self
):
def
makerepairinstructions
(
self
):
...
...
Mac/Modules/scrap/scrapsupport.py
Dosyayı görüntüle @
420ed403
...
@@ -11,15 +11,19 @@ import string
...
@@ -11,15 +11,19 @@ import string
# Declarations that change for each manager
# Declarations that change for each manager
MACHEADERFILE
=
'Scrap.h'
# The Apple header file
MACHEADERFILE
=
'Scrap.h'
# The Apple header file
MODNAME
=
'_Scrap'
# The name of the module
MODNAME
=
'_Scrap'
# The name of the module
OBJECTNAME
=
'Scrap'
# The basic name of the objects used here
# The following is *usually* unchanged but may still require tuning
# The following is *usually* unchanged but may still require tuning
MODPREFIX
=
'Scrap'
# The prefix for module-wide routines
MODPREFIX
=
'Scrap'
# The prefix for module-wide routines
OBJECTTYPE
=
OBJECTNAME
+
'Ref'
# The C type used to represent them
OBJECTPREFIX
=
MODPREFIX
+
'Obj'
# The prefix for object methods
INPUTFILE
=
string
.
lower
(
MODPREFIX
)
+
'gen.py'
# The file generated by the scanner
INPUTFILE
=
string
.
lower
(
MODPREFIX
)
+
'gen.py'
# The file generated by the scanner
OUTPUTFILE
=
'@'
+
MODNAME
+
"module.c"
# The file generated by this program
OUTPUTFILE
=
'@'
+
MODNAME
+
"module.c"
# The file generated by this program
from
macsupport
import
*
from
macsupport
import
*
# Create the type objects
# Create the type objects
ScrapRef
=
OpaqueByValueType
(
OBJECTTYPE
,
OBJECTPREFIX
)
includestuff
=
includestuff
+
"""
includestuff
=
includestuff
+
"""
#ifdef WITHOUT_FRAMEWORKS
#ifdef WITHOUT_FRAMEWORKS
...
@@ -44,21 +48,31 @@ SCRRec_New(itself)
...
@@ -44,21 +48,31 @@ SCRRec_New(itself)
ScrapStuffPtr
=
OpaqueByValueType
(
'ScrapStuffPtr'
,
'SCRRec'
)
ScrapStuffPtr
=
OpaqueByValueType
(
'ScrapStuffPtr'
,
'SCRRec'
)
ScrapFlavorType
=
OSTypeType
(
'ScrapFlavorType'
)
ScrapFlavorType
=
OSTypeType
(
'ScrapFlavorType'
)
ScrapFlavorFlags
=
Type
(
'ScrapFlavorFlags'
,
'l'
)
#ScrapFlavorInfo = OpaqueType('ScrapFlavorInfo', 'ScrapFlavorInfo')
putscrapbuffer
=
FixedInputBufferType
(
'void *'
)
putscrapbuffer
=
FixedInputBufferType
(
'void *'
)
class
MyObjectDefinition
(
GlobalObjectDefinition
):
pass
# Create the generator groups and link them
# Create the generator groups and link them
module
=
MacModule
(
MODNAME
,
MODPREFIX
,
includestuff
,
finalstuff
,
initstuff
)
module
=
MacModule
(
MODNAME
,
MODPREFIX
,
includestuff
,
finalstuff
,
initstuff
)
object
=
MyObjectDefinition
(
OBJECTNAME
,
OBJECTPREFIX
,
OBJECTTYPE
)
module
.
addobject
(
object
)
# Create the generator classes used to populate the lists
# Create the generator classes used to populate the lists
Function
=
OSErrFunctionGenerator
Function
=
OSErrFunctionGenerator
Method
=
OSErrMethodGenerator
# Create and populate the lists
# Create and populate the lists
functions
=
[]
functions
=
[]
methods
=
[]
execfile
(
INPUTFILE
)
execfile
(
INPUTFILE
)
# add the populated lists to the generator groups
# add the populated lists to the generator groups
# (in a different wordl the scan program would generate this)
# (in a different wordl the scan program would generate this)
for
f
in
functions
:
module
.
add
(
f
)
for
f
in
functions
:
module
.
add
(
f
)
for
f
in
methods
:
object
.
add
(
f
)
# generate output (open the output file as late as possible)
# generate output (open the output file as late as possible)
SetOutputFileName
(
OUTPUTFILE
)
SetOutputFileName
(
OUTPUTFILE
)
...
...
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