mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Fixed the bugs in the constant definitions, and in the code to test
them. The FutureWarnings are still there, until a way has been found to say "I know what I'm doing here when I say 0xff000000".
This commit is contained in:
parent
87eea88b5a
commit
7ca993ed37
4 changed files with 14 additions and 10 deletions
|
|
@ -34,14 +34,14 @@ class MyScanner(Scanner):
|
|||
|
||||
def writeinitialdefs(self):
|
||||
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
|
||||
self.defsfile.write("from TextEdit import *\n")
|
||||
self.defsfile.write("from QuickDraw import *\n")
|
||||
self.defsfile.write("from Dragconst import *\n")
|
||||
self.defsfile.write("from CarbonEvents import *\n")
|
||||
self.defsfile.write("from Appearance import *\n")
|
||||
self.defsfile.write("from Carbon.TextEdit import *\n")
|
||||
self.defsfile.write("from Carbon.QuickDraw import *\n")
|
||||
self.defsfile.write("from Carbon.Dragconst import *\n")
|
||||
self.defsfile.write("from Carbon.CarbonEvents import *\n")
|
||||
self.defsfile.write("from Carbon.Appearance import *\n")
|
||||
self.defsfile.write("kDataBrowserItemAnyState = -1\n")
|
||||
self.defsfile.write("kControlBevelButtonCenterPopupGlyphTag = -1\n")
|
||||
self.defsfile.write("kDataBrowserClientPropertyFlagsMask = 0xFF << 24 # kDataBrowserClientPropertyFlagsOffset\n")
|
||||
self.defsfile.write("kDataBrowserClientPropertyFlagsMask = 0xFF000000\n")
|
||||
self.defsfile.write("\n")
|
||||
|
||||
def makeblacklistnames(self):
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ class MyScanner(Scanner):
|
|||
|
||||
def writeinitialdefs(self):
|
||||
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
|
||||
self.defsfile.write("from TextEdit import *\n")
|
||||
self.defsfile.write("from QuickDraw import *\n")
|
||||
self.defsfile.write("from Carbon.TextEdit import *\n")
|
||||
self.defsfile.write("from Carbon.QuickDraw import *\n")
|
||||
self.defsfile.write("\n")
|
||||
# Defines unparseable in Drag.h
|
||||
self.defsfile.write(MISSING_DEFINES)
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ kTXNUseCurrentSelection = 0xFFFFFFFF
|
|||
kTXNStartOffset = 0
|
||||
kTXNEndOffset = 0x7FFFFFFF
|
||||
MovieFileType = FOUR_CHAR_CODE('moov')
|
||||
kTXNUseEncodingWordRulesMask = 0x80000000
|
||||
kTXNFontSizeAttributeSize = 4
|
||||
""")
|
||||
|
||||
def makeblacklistnames(self):
|
||||
|
|
@ -72,6 +74,8 @@ MovieFileType = FOUR_CHAR_CODE('moov')
|
|||
"kTXNQDFontStyleAttributeSize",
|
||||
"kTXNQDFontColorAttributeSize",
|
||||
"kTXNTextEncodingAttributeSize",
|
||||
"kTXNUseEncodingWordRulesMask",
|
||||
"kTXNFontSizeAttributeSize",
|
||||
"status",
|
||||
"justification",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ def main():
|
|||
scanner = MyScanner(input, output, defsoutput)
|
||||
scanner.scan()
|
||||
scanner.close()
|
||||
print "=== Testing definitions output code ==="
|
||||
execfile(defsoutput, {}, {})
|
||||
## print "=== Testing definitions output code ==="
|
||||
## execfile(defsoutput, {}, {})
|
||||
print "=== Done scanning and generating, now importing the generated code... ==="
|
||||
exec "import " + SHORT + "support"
|
||||
print "=== Done. It's up to you to compile it now! ==="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue