Commits

Ronald Oussoren committed 0e339af

A quick hack that makes sure that the wrapper-generator sees string constants
in the NSMetaDataQuery API.

Comments (0)

Files changed (2)

Lib/Foundation/test/test_globals.py

             data = self.stopCaptureStderr()
             self.assert_("This is a test %@" in data, data)
 
+    def testSpotlight(self):
+        if hasattr(Foundation, 'NSMetadataQuery'):
+            self.assert_(hasattr(Foundation, 'NSMetadataQueryDidFinishGatheringNotification'))
+            self.assert_(isinstance(Foundation.NSMetadataQueryDidFinishGatheringNotification, unicode))
+
 
 if __name__ == "__main__":
     unittest.main()

Scripts/CodeGenerators/strconst_generator.py

 
 ON_OSX= (sys.platform == "darwin")
 
-MATCH_RE=re.compile(r'NSString\s*\*\s*(const\s+)?([A-Za-z_][A-Za-z0-9_]*(\s*,\s*\*\s*[A-Za-z_][A-Za-z0-9_]*)*)(\s+AVAILABLE_\w+)?;')
+MATCH_RE=re.compile(r'NSString\s*\*\s*(const\s+)?([A-Za-z_][A-Za-z0-9_]*(\s*,\s*\*\s*[A-Za-z_][A-Za-z0-9_]*)*)(\s+AVAILABLE_\w+)?(\s+NSMQA1)?;')
 
 def entry(fp, val, ignore):
     vals = val.split(',')