Regenerated from Universal Headers 3.0.1. Some new calls are
blacklisted, because they are not available in classic 68k programs,
and bgen doesn't have a way to put #ifdef/#endif in the generated
code. For now we only implement calls that work on all three models.
diff --git a/Mac/Modules/ae/aescan.py b/Mac/Modules/ae/aescan.py
index 4317195..620a91c 100644
--- a/Mac/Modules/ae/aescan.py
+++ b/Mac/Modules/ae/aescan.py
@@ -19,7 +19,7 @@
 	input = "AERegistry.h"
 	output = "@dummy-registry.py"
 	defsoutput = TOOLBOXDIR + "AERegistry.py"
-	scanner = AppleEventsScanner(input, output, defsoutput)
+	scanner = AppleEventsRegScanner(input, output, defsoutput)
 	scanner.scan()
 	scanner.close()
 	print "=== Scanning AEObjects.h for defines ==="
@@ -32,11 +32,19 @@
 	scanner = AppleEventsScanner(input, output, defsoutput)
 	scanner.scan()
 	scanner.close()
-	print "=== Scanning AppleEvents.py ==="
+	print "=== Scanning AEDataModel.h ==="
+	input = "AEDataModel.h"
+	output = "aedatamodelgen.py"
+	defsoutput = TOOLBOXDIR + "AEDataModel.py"
+	scanner = AppleEventsScanner(input, output, defsoutput)
+	
+	scanner.scan()
+	scanner.close()
+	print "=== Scanning AppleEvents.h ==="
 	input = "AppleEvents.h"
 	output = "aegen.py"
 	defsoutput = TOOLBOXDIR + "AppleEvents.py"
-	scanner = AppleEventsScanner(input, output, defsoutput)
+	scanner = AppleEventsRegScanner(input, output, defsoutput)
 	scanner.scan()
 	scanner.close()
 	print "=== Done Scanning and Generating, now doing 'import aesupport' ==="
@@ -102,5 +110,13 @@
 			 [("AEDescList_ptr", "*", "InMode")]),
 			]
 
+	def writeinitialdefs(self):
+		self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
+
+class AppleEventsRegScanner(AppleEventsScanner):
+	def writeinitialdefs(self):
+		self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
+		self.defsfile.write("from AEDataModel import *\n")
+
 if __name__ == "__main__":
 	main()