Commits

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,