Ronald Oussoren avatar Ronald Oussoren committed 7e42cc5

Add a objc.__version__ variable

Comments (0)

Files changed (4)

+2002-10-09 Ronald Oussoren <oussoren@cistron.nl>
+	* Move Cocoa.AppKit and Cocoa.Foundation packages to AppKit
+	  and Foundation
+
 2002-09-28 Ronald Oussoren <oussoren@cistron.nl>
 	* objc-class.m: Actually implement the selector->python cache,
 	  this significantly speeds up method dispatch (iClass is now

pyobjc/Lib/objc/__init__.py

 new-style pyobjc
 """
 from _objc import *
+from _objc import __version__
 
 # Backward compat stuff, Python 2.2.0 doesn't have 'True' and 'False'
 try:

pyobjc/Modules/objc/module.m

 				PyString_FromStringAndSize(&cur->value, 1));
 		}
 	}
+
+	PyDict_SetItemString(d, "__version__", 
+		PyString_FromString(PYOBJC_VERSION));
 }

pyobjc/Modules/objc/pyobjc.h

 #include "OC_PythonObject.h"
 #include "super-call.h"
 
+#define PYOBJC_VERSION "0.7.0"
+
 #ifdef MACOSX
 
 /* On MacOS X, +signatureWithObjCTypes: is a method of NSMethodSignature,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.