Commits

Anonymous committed 41dcabd

Initial revision

Comments (0)

Files changed (28)

+Makefile
+Makefile.pre
+Setup
+config.c
+pyobjc
+sedscript
+b exit
+r
+2
+2
+bt
+tl
+ts 2
+bt
+ts 1
+tl
+bt
+frame 10
+dir ~/bbum-developer/Python-2.0-MOSXS
+dir ~/bbum-developer/Python-2.0-OSXS
+dir ~/bbum-developer/Python-2.0-OSXS/Modules
+dir ~/bbum-developer/Python-2.0-OSXS/Objects
+dir ~/bbum-developer/Python-2.0-OSXS/Python
+l
+p pathname
+p image
+l 100
+l
+l
+l
+l
+l
+bt
+b raise
+2
+r
+up
+l
+p rettype
+p retbuffer
+info frame
+b raise
+2
+r
+bt
+frame 5
+l
+p rettype
+p methinfo
+p *methinfo
+p [methinfo methodReturnType]
+p (char *) [methinfo methodReturnType]
+p _C_VOID
+quit
+r
+b ObjCObject_call
+c
+THIS LIST DOES NOT CLAIM COMPLETENESS.
+
+==> Status indicators: (-) not fixed; (*) fixed; (?) not sure.
+
+What?!? You have the solution for one of these points? Run the Mailer!
+======================================================================
+
+Problems that are difficult to solve
+------------------------------------
+
+(-) Does not handle calls with variable number of arguments.  (This is
+actually impossible to completely fix without reimplementing *all* of
+the logic behind the methods that take varargs;  i.e. reimplementing
+everything necessary to deal with +stringWithFormat: or
++arrayWithObjects: type API-- two very different beasts [bbum]). 
+
+(-) Does not handle methods returning values of size bigger than
+sizeof (void *).  (This is also hard to fix;  to do so requires either
+creating a bunch of methods with the various possible return types or
+doing some very serious hardcore pointer magic. [bbum])
+
+(-) It's impossible to send messages containing '$' in the name: ObjC
+allows it, Python does not.
+
+(-) Fix issues with API that requires pointers;  NSScanner, for
+example.  See Mssh.
+
+Known portability problems
+--------------------------
+
+(?) The GNU Runtime is still untested. This is because I wasn't able
+link this module on my NeXT using the latest GNU gcc and runtime:
+multiple defined symbols between libgcc.a and libsys_s.a. Oh, well.
+Once the NeXT support is stable, I will jump on this.
+
+(-) When WITH_FOUNDATION is not defined (it is only when using the GNU
+Runtime, and will be on OpenStep), Objective-C objects are not
+retained nor released, so the code may access freed objects.
+
+(-) GNUstep Base wants the main function of the application be
+``gnustep_base_user_main''. NSProcessInfo implements its own ``main''
+function to initialize internal copies of arguments and environ,
+then calls gnustep_base_user_main(). We have to patch pythonrun.c for
+this. 
+
+(-) Does OpenStep behave badly as NeXTSTEP on NSPasteboard's names and
+types?
+
+Others
+------
+
+(-) Sending ObjC messages from multiple threads does not currently work.
+The ``argument arena'' in objc_support.c should be rewritten thread-safe.
+
+(-) The ``forward'' mechanism should be revised: the current
+implementation assumes the arguments passed are ALL Objective-C
+objects, since no check is possible...  (Not sure this can be fixed,
+but it should be revisited given that the Mac OS X/XS APIs for
+forwarding are a bit different than the old forward:: APIs. [bbum])
+
+(-) [OC_MemoryStream close] should deallocate the stream's buffer with
+vm_deallocate(). See NXCloseMemory() documentation. (NXStream APIs are
+gone, gone, gone.  But we might want to revit this in light of NSData,
+NSFileHandle, etc... [bbum]?)
+
+(-) Suspicious code is marked with 'XXX'.
+
+Missing
+-------
+
+(*) With Foundation, pythonify_c_value and its counterpart should convert
+to/from NSString and PyStringObject. (What about Unicode???? [bbum])
+1998-08-18  Lele Gaifax  <lele@paci.nautilus>
+
+	* objc_support.h (ISCLASS): Check against META flag, an object is
+	a class when its class pointer points to a metaclass...
+
+	* ObjC.m (initObjC): Disabled the autorelease support: have to
+	wait to patch Python for that.
+
+	* OC_PythonObject.m ([OC_PythonObject
+	-forwardInvocation:invocation]): use argumentInfoAtIndex:
+	* ObjCMethod.m (ObjCMethod_pack_argument): likewise.
+
+	* Here and there: I give up: make gcc happy by using #include, not
+	#import...  
+
+	* Makefile.pre.in (static): Use $(OCC) to link the executable.
+
+	* objc_support.h: Removed warning on GNUstep not supported...
+
+Tue Mar 24 19:56:46 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>
+
+	* ObjC.h (PyObjC_VERSION): Version 0.54.
+
+Sat Jan 17 00:49:29 1998  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* OC_PythonObject.h (@interface OC_PythonObject): Now derived from
+	NSProxy.
+
+Sat Jan 10 13:22:31 1998  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* INSTALL: Added shared module recipe.
+
+Thu Jan  8 20:20:32 1998  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* ObjC.h: Removed ObjCStream declaration.
+
+Sun Jan  4 17:28:55 1998  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* ObjC.h (PyObjC_VERSION): Version 0.53.
+
+	* Demo/LittleButtonedWindow/LittleButtonedWindow.py (run): Import
+	ObjC before AppKit, so that the '-[' option is not needed.
+
+	* ObjC.m (initObjC): Be sure the AutoreleasePool is instantiated. 
+
+	* ObjCObject.m (ObjCObject_call): use
+	instancesRespondToSelector:. 
+
+Mon Dec 29 15:34:57 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* ObjC.h: Removed ObjCSequenceObject_Type and
+	ObjCMappingObject_Type. 
+
+Sun Dec 28 19:51:28 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* ObjC.m (ObjC_load_object_files): Removed.
+	(ObjC_list_classes): Removed.
+
+	* ObjCRuntime.m (ObjCRuntime_methods): Likewise.
+
+	* ObjCRuntime.m (ObjCRuntime_getattro): Renamed ``kind'' to
+	``__kind__''. 
+	(ObjCRuntime_getattro): Removed ``__dict__'', added
+	``__objc_classes__''. 
+
+	* OC_PythonObject.h: Renamed from the anonymous ``object''.
+
+Fri Dec 26 20:55:39 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* ObjC.h (PyObjC_VERSION): Version 0.52.
+
+Mon Dec 22 20:07:49 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* objc_support.m (pythonify_c_value): If the object is an
+ 	NSString, return a corresponding PyString.
+	(depythonify_c_value): If the expected type is an ObjC object and
+ 	we have a PyString, convert it in a corresponding NSString.
+	(execute_and_pythonify_objc_method): if the method returns void,
+ 	return Py_None.
+
+	* ObjCMethod.m (ObjCMethod_new_with_selector): Trap bad
+	selectors. 
+	(ObjCMethod_pack_argument): Reenabled.
+	(ObjCMethod_unpack_argument): Likewise.
+
+Tue Dec 16 19:46:07 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* ObjC.h (PyObjC_VERSION): Version 0.51. Tons of changes, dropped
+	NeXTSTEP runtime support, renewed around the new OS API.
+
+Wed Apr 16 23:53:37 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* PyObjC.fproj/ObjC.h (PyObjC_VERSION): Version 0.48, first
+	running on OpenSTEP!
+
+Thu Apr 10 22:14:03 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* ObjC.fproj/ObjC.h (WITH_FOUNDATION): Simplified variants
+	selection. 
+
+Wed Apr  9 19:19:30 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* ObjC.fproj/OC_PythonObject.m ([OC_PythonObject
+	-forward:aSelector:argFrame]): Removed GNU_RUNTIME support.
+
+Mon Apr  7 18:19:52 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Demo/ObjC/AlertPanel/AlertPanel.h: Include OC_PythonObject.h,
+	not PythonObject.h. Thanx Andrew Robinson <andy@hps1.demon.co.uk>.
+
+Sun Mar 23 22:49:12 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/makesetup: Allow -f (for frameworks) as a library flag
+	within module rules.
+
+Tue Mar 18 19:50:05 1997  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/makesetup: Added an option -M to change the name of the
+	created Makefile.  
+
+Fri Nov 15 09:12:01 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/objc_support.m (depythonify_c_value): Don't check the
+	string size for arguments of type (void *).
+
+	* Modules/OC_Pasteboard.m (-setData:forType:): DATA must be a kind
+	of OC_Stream. 
+
+Sun Nov 10 09:27:45 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h, Include/OC_PythonObject.h,
+	Include/OC_PythonBundle.h, Include/OC_Pasteboard.h: Untabified. 
+
+Sat Nov  9 19:08:31 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/OC_Stream.m, Modules/OC_PythonObject.m,
+	Modules/OC_PythonBundle.m, Modules/OC_Pasteboard.m,
+	Modules/ObjCStreams.m, Modules/ObjCRuntime.m,
+	Modules/ObjCPointer.m, Modules/ObjCObject.m, Modules/ObjCMethod.m,
+	Modules/objc_support.m, Modules/ObjC.m: Untabified.
+
+Tue Oct 29 10:33:43 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.47.
+
+Mon Oct 28 16:38:52 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/ObjC.m: Splitted.
+
+	* Modules/ObjCRuntime.m: New file.
+
+	* Modules/ObjCMethod.m: New file.
+
+	* Modules/ObjCObject.m: New file.
+
+	* Modules/ObjCPointer.m: New file.
+
+	* Demo/ObjC/ShellText/ShellText_SingleUnderscore.py (main):
+	Likewise. 
+
+	* Demo/ObjC/ShellText/ShellText.py (main): With a command line
+	argument, show that file. Accepts also a -t|--title option.
+
+	* INSTALL.PyObjC: Updated.
+
+	* Misc/Makefile.pre.in (TARGET): set to pyobjc.
+
+Sun Oct 27 11:55:53 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/ObjC.m (ObjCObject_sq_ass_item): Implemented.
+
+	* Modules/OC_PythonObject.m (+newWithObject:): If the object is an
+	ObjCObject, return the wrapped Objective-C object without creating
+	a new instance.
+
+Sat Oct 26 13:13:41 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/ObjC.m (ObjCSequenceObject_methods): New methods on
+	sequence objects.
+	(ObjCMappingObject_methods): New methods on mapping objects.
+
+	* Modules/objc_support.m (pythonify_c_value): If an obj is a kind
+	of OC_Stream, wrap it in a ObjCStream, not in a generic	ObjCObject. 
+	(depythonify_c_value): viceversa.
+
+	* Modules/ObjCStreams.m (ObjCStream_new): New function.
+
+	* Misc/Makefile.pre.in: Added $(LINKFORSHARED) to link command.
+
+Fri Oct 25 15:08:23 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/ObjC.m (ObjCSequenceObject_Type): New invisible type
+	with sequence access.
+	(ObjCMappingObject_Type): New invisible type with mapping access. 
+	(ObjCObject_new): If an object is a sequence (responds to -length
+	and -objectAt:) use ObjCSequenceObject_Type. If it is a dictionary
+	(responds to -length and -valueForKey:) use
+	ObjCMappingObject_Type. 
+
+	* Doc/libObjC.tex (subsection{ObjCObject objects}): Tell about
+	sequence and mapping access syntax.
+
+	* All sources: slightly better methods documentation, as well as
+	better error messages for PyArg_ParseTuple().
+
+Thu Oct 24 14:23:04 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/OC_Pasteboard.h: Now all methods are in a category of
+	the Pasteboard class. OC_Pasteboard is gone.
+
+	* Modules/OC_PythonObject.m (-count): New method.
+
+	* Modules/ObjC.m (ObjCObject_Type): added sequence capabilities.
+
+Sat Oct 19 11:56:40 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/Setup.PyObjC.in (ObjC): Refer to sources in Modules.
+
+Fri Oct 18 14:12:00 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.46.
+
+	* Doc/libObjCStreams.tex: Tell the difference between NeXTSTEP and
+	OpenStep implementation of OC_Stream.
+
+	* Doc/libPyObjC.tex: Include libObjC and libObjCStreams.
+
+	* INSTALL.PyObjC: Updated.
+
+Thu Oct 17 18:10:46 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/OC_Stream.h (@interface OC_Stream): (WITH_FOUNDATION)
+	now is a subclass of NSData.
+
+	* Modules/OC_Stream.m (-freeWhenDone:): new method.
+	(+newFromMemory:length:withMode:): use it.
+	(+newFromFilename:withMode:): idem.
+
+	* Include/OC_Stream.h (@interface OC_Stream): openByUs renamed
+	freeWhenDone. 
+
+	* Modules/Setup.PyObjC.in (ObjC): Added OC_Pasteboard.m.
+
+	* Modules/objc_support.h (depythonify_objc_message): sped up.
+	(pythonify_objc_message): idem.
+
+Wed Oct 16 19:50:46 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/Setup.PyObjC.in (ObjC): Added OC_PythonBundle.m
+
+	* Modules/ObjC.m (initObjC): Force the load of OC_PythonBundle.
+
+Tue Oct 15 09:12:37 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/ObjC.m (ObjCMethod_unpack_argument): Was passing a
+	PyStringObject instead of the cstring itself to sprintf().
+	(ObjCObject_getattr): Print the warning only the first time the
+	method gets fetched.
+
+	* Modules/OC_Python.m: Dropped. It was used just as a shortcut for
+	the Setup file.
+
+	* Include/OC_Python.h: Idem.
+
+	* Modules/Setup.PyObjC.in (ObjC): Removed OC_Python.m, added
+	PythonObject.m OC_PythonInt.m OC_PythonString.m.  
+
+Mon Oct 14 15:48:58 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.45.
+
+	* Doc/libObjC.tex: Describe the single-underscore syntax.
+
+Thu Oct 10 11:11:21 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/OC_Stream.h: Renamed +newFromMappedFile: to
+	+newFromFilename:. 
+	Rename -saveToFile: to -saveToFilename:.
+
+	* Modules/ObjCStreams.m (ObjCStream_seek): Use the renamed method. 
+
+	* Include/OC_Stream.h: Renamed -setStreamPosition:from: to
+	 -setStreamPosition:seekMode: for uniformity with GNUstep.
+
+	* Modules/ObjCStreams.m (ObjCStream_dealloc): test for
+	WITH_FOUNDATION, not GNU_RUNTIME.
+	(STREAM_.*DURING.*): Simplified and implemented Foundation
+	variants. 
+
+	* Modules/objc_support.h: stub support for OpenStep.
+
+Wed Oct  9 10:46:50 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.44.
+
+Tue Oct  8 18:02:58 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/ObjC.m (ObjCPointer_unpack): Check for void *.
+	(ObjC_methods): new method make_pointer, to create arbitrary
+	pointer objects.
+
+	* Modules/objc_support.m (depythonify_c_value:_C_DBL): accepts an
+	integer value too.
+	(depythonify_c_value:_C_FLT): likewise.
+
+Mon Oct  7 14:46:35 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.43.
+
+	* Modules/Setup.PyObjC.in: Added ObjCStreams.m.
+
+Fri Oct  4 16:53:41 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.42.
+
+	* Modules/ObjC.m: ObjCStream objects implementation. 
+
+	* Modules/objc_support.m (pythonify_c_value): Hack to support
+	passing NXStreams as ObjCStream objects.
+	(depythonify_c_value): likewise.
+
+Thu Oct  3 12:42:30 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/ObjC.m: Moved BUGS section to BUGS.PyObjC.
+	(ObjCObject_call): Support for initialization arguments.
+
+        * README.PyObjC: splitted, creating INSTALL.PyObjC and
+	NEWS.PyObjC.
+	
+	* Modules/makesetup: Little note to explain my changes.
+	: Undone */* hack on source names. Silly me! I should never fix
+	something too early in the morning ;-)
+	
+	* Modules/Setup.PyObjC.in: Sources are in the Modules/ directory.
+
+Wed Oct  2 12:36:10 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.41.
+
+	* Misc/Makefile.pre.in: Fits PyObjC needs.
+	
+	* Modules/ObjC.m (ObjCMethod_pack_argument): Return an ObjCPointer
+	object, not a string.
+	(ObjCMethod_unpack_argument): Accepts ObjCPointer objects as
+	well as strings.
+
+	* Modules/objc_support.m (objc_skip_typespec): Corrected
+	_C_UNION_B branch: unions are not prepended by their tag like
+	structures.
+	(objc_alignof_type): likewise.
+	(objc_sizeof_type): likewise.
+	(pythonify_c_value): Support _C_UNIONs by translating them to
+	strings. 
+	(depythonify_c_value): Likewise, accepting a string of the right
+	size. 
+	(pythonify_c_value): Use ObjCPointer to encode pointers, do not
+	pythonify the content of the pointed value.
+
+Fri Sep 27 17:10:12 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/objc_support.m (execute_and_pythonify_objc_method): Show
+	the expected ObjC type in the error message for type mismatch.
+
+	* Modules/ObjC.m (ObjCMethod_pack_argument): likewise.
+	(ObjC_lookup_class): better error message.
+	(ObjCRuntime_getattro): Set the error message if the class cannot
+	be found.
+	(ObjCMethod_pack_argument): Reset the buffer if the value is not
+	given. 
+
+Fri Sep 27 11:40:04 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.4.
+
+	* Modules/ObjC.m (ObjCRuntime_sel_is_mapped): Implemented.
+
+	* Modules/objc_support.m (execute_and_pythonify_objc_method):
+	Handle floats and doubles return values.
+
+Thu Sep 26 10:45:36 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.31.
+
+	* Modules/ObjC.m (ObjC_list_classes): Oops! Use DECREF not INCREF
+        on item.
+
+	* Modules/objc_support.m (execute_and_pythonify_objc_method): For
+	consistency, refer to the first argument as 0, not 1.
+
+	* Modules/ObjC.m (ObjCRuntime_getattro): Added 'kind' member,
+	which is set to ``GNU'' if using the GNU runtime, ``NeXT''
+	otherwise. 
+
+Tue Sep 24 12:40:18 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/OC_PythonObject.m (get_method_for_selector): To support
+	the single underscore notation, always pythonify the objc message.
+
+	* Modules/objc_support.h (pythonify_objc_message): Support for
+	single underscore notation.
+	(depythonify_objc_message): likewise.
+
+Fri Sep 20 12:03:22 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.3.
+
+	* Modules/ObjC.m (ObjCMethod_pack_argument): Implemented
+	GNU_RUNTIME support.
+	(ObjCMethod_unpack_argument): Likewise.
+
+	* Modules/OC_PythonObject.m (-forward::): Banalized: removed check
+	against the runtime, since it was in any way a guess. Also, support
+	the GNU runtime.
+
+	* Modules/objc_support.m (execute_and_pythonify_objc_method): If
+	an error occurred executing the method, do not pythonify the
+	result and let the interpreter raise the error by returning NULL.
+
+	* Modules/OC_PythonObject.m (-respondsTo:): Clear the error status
+	and return NO if the Python Object does not respond to the method.
+
+	* Modules/ObjC.m: Added version number to the module's doc, and
+	show an example of the alternative syntax.
+
+Mon Sep 16 11:44:35 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Include/ObjC.h (PyObjC_VERSION): Version 0.2.
+
+	* Modules/objc_support.m (depythonify_c_value): Accept also Class
+	object for _C_ID type ([Object isKindOf:] does not specify its arg
+	must be a class...).
+
+	* Modules/ObjC.m (ObjCMethod_pack_argument): New method on
+	ObjCMethod, to support pass-by-ref parameters. 
+	(ObjCMethod_unpack_argument): idem.
+
+	* Modules/ObjC.m (ObjCObject_get_class): New method on ObjCObject,
+	named "Class", as a workaround to get the class of an object
+	(``class'' is a reserved keyword in Python).
+
+	* Modules/ObjC.m (ObjCRuntime_getattro): Clean the error set by
+	PyDict_GetItem and by Py_FindMethod.
+
+	* Modules/objc_support.m (depythonify_c_value): For pointer
+	arguments, accept a string object too: if the sizes match, then
+	the string object will contain whatever the method will put in it,
+	so you'll can use struct.unpack() on it.
+
+Fri Sep 13 11:14:50 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+        * All sources: added a disclaimer, you never know...
+	
+	* Include/ObjC.h (PyObjC_VERSION): Initialized to 0.1.
+
+	* Modules/ObjC.m (ObjCObject_call): Implemented: if X is an ObjC
+	class, then X() is equivalent to X.new(). Does not handle
+	arguments yet.
+	(ObjCRuntime_Type): Implemented.
+	(initObjC): Put an instance of ObjCRuntime in the module
+	dictionary as the ``runtime'' member. This allow a new syntax to
+	get an ObjC class: ObjC.runtime.TheClass.
+	(initObjC): Added ``__version__'' to module's dictionary.
+
+	* Modules/objc_support.m (pythonify_c_value): Do not convert
+	pointers to integers, but rather dereference them and convert the
+	value they point to.
+	(depythonify_c_value): Correctly handle pointers: allocate some
+	memory to keep the pointed value and depythonify there.
+	(execute_and_pythonify_objc_method): initialize the arguments
+	arena, where we eventually allocate memory for pointer arguments. 
+
+Thu Sep 12 16:12:43 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/OC_PythonObject.m (-mappingDelItemString:): Work around
+	to 1.4b3 bug: use PyDict_DelItemString if PyMapping_DelItemString
+	is not defined in abstract.h. 
+	(-mappingDelItem:): likewise.
+
+	* Modules/objc_support.m (pythonify_c_value): Convert nil to None,
+	not NULL. nil is sometimes used by the current NS API to signal an
+	error. But OpenStep will use exceptions, so I think this is a safe
+	change. This cures x.superclass() bug when x is an instance of the
+	root class.
+
+	* Modules/ObjC.m (ObjCObject_methods): added .isInstance and
+	.isClass methods.
+
+Wed Sep 11 11:50:02 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/objc_support.m (execute_and_pythonify_objc_method): In
+	the error message about bad arguments, refer to the first argument
+	as "1", not "0".
+
+Tue Sep 10 19:31:10 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/ObjC.m (ObjCMethod_call): Support for passing/receiving
+	complex structures to/from the ObjC method.
+
+Sat Sep  7 12:20:18 1996  Lele Gaifax  <lele@nautilus.eclipse.it>
+
+	* Modules/ObjC.m: unified the decoding/encoding switches. 
+
+	(ObjC_load_object_files): GNU rt support implemented.
+
+FIXME_1: In pythonify_c_value() there is the conversion a returned
+	 NSString to a PyStringObject. How can we deal with NSString
+	 class cluster? Should it maybe check for -cString and -length?
+
+* support -release and -autorelease invocations from within Python by setting the reference to the encapsulated ObJC object in the ObjCObject structure to nil (and passing through the release/autorelease).   This is not as trivial as it sounds;  a method invocation involves two mechanisms.  First, the getattr() function is called on ObjCObject to retrieve an ObjCMethod representing the method to be invoked.  The ObjCMethod structure contains a reference to the ObjC object in an NSInvocation, but does not contain a reference to the ObjCObject structure that would be required-- adding this appears to be a case of figuring out what is up with Python reference counting.
+
+* add detection of Mac OS X vs. Mac OS X Server so that references to obsoleted APIs can be removed from the OSX build.
+
+* fix multithreading support in the method dispatch mechanisms.  In particular, I believe [but didn't dig] that the argument decoding/encoding stuff is not thread safe in that it uses static variables?
+
+* add support for proper sequence and dictionary based manipulation of ObjC objects via the standard python mechanisms
+
+* rip off various "intra-language interface friendly" API and code from Mssh: MultiScript Shell -- see ftp://ftp.codefab.com/pub/unsupported/.   (Before anyone gets offended by "rip off", I wrote Mssh and I'm writing this comment and, as such, I'm "ripping off" my own code!.  <bbum@codefab.com>)
+
+* fix BUGS
+# -*- indented-text -*-
+# This file was written by Bill Bumgarner. I updated it to fit
+# packaging needs, and I'm still maintaining it as part of the kit.
+# 
+# This file is part of PyObjC package.
+#
+# INSTALL,v
+# 1.8
+# 1998/03/24 18:55:42
+#
+ 
+Building the Module
+===================
+
+***
+***  NOTE: You must build Python with Objective-C enabled by
+***        specifying --with-objc to the configure script to use this.
+***
+
+Statically
+==========
+
+When freshly unpacked, the first task is to build the Makefile that
+will be used for all subsequent builds.  To do this, invoke the
+following make command:
+
+        make -f Makefile.pre.in boot
+
+maybe specifying PYTHON=python1.5 if you didn't installed it at all or
+used altinstall to do it.
+
+Once the Makefile is built, a statically linked Python executable
+containing all of the modules mentioned in Setup.in can be built by
+making the target 'static'.  By default, it will build a binary named
+`pyobjc'. Alternatively, the name of the resulting statically linked
+executable can be controlled by setting the TARGET variable's value
+from the make command line:
+
+        make static
+or
+        make static TARGET=python-with-objc
+        
+Once done, try:
+
+$ ./pyobjc 
+Python 1.5 (#11, Sun Jan 04 1998, 14:41:11)  [GCC NeXT DevKit-based
+CPP 4.0] on next4
+>>> import ObjC
+>>> dir (ObjC.runtime)
+['HashTable', 'List', 'NSAllDescendantPathsEnumerator', ...]
+
+and you should get the list of known Objective-C classes.
+
+
+Shared Module
+=============
+
+An alternative way is to build a shared module: add a single line
+containing just "*shared*" at the top of Setup.in, *BEFORE* building
+the Makefile, or *YOU*HAVE*TO* run it again.
+
+To build the module in this way simply issue a "make" command, without
+the "static" argument. To test it of course you will have to load the
+normal interpreter, and import it as usual.
+
+$ python -v
+...
+Python 1.5 (#14, Thu Jan 08 1998, 22:14:25)  [GCC NeXT DevKit-based CPP 4.0] on next4
+Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
+>>> import ObjC
+import ObjC # dynamically loaded from ObjC.so
+
+
+Demos
+=====
+
+If it works and you are on NeXTSTEP (or just curious ;-) go in
+Demo/ObjC and try the examples: though very simple, they give the
+idea; both are based on NeXTSTEP' bundles, so you need that OS to
+enjoy them.
+
+The LittleButtonedWindow demo puts a window on the screen, with a
+button in it.
+
+XXX NOT UPDATED YET XXX
+
+AlertPanel will put an NXAlertPanel on the screen, completely piloted
+by the Python script;
+
+Forward will attach a Python instance method as the `action' of an
+ObjC object and then that object will be asked to perform an unknown
+method on the Python object... intricated to explain, easier to see ;-)
+
+ShellText is actually one of the shorter ways to build a NeXTSTEP
+application able to show in its own window its *entire* source code ;-)
+
+
+Documentation
+=============
+
+The documentation of the module is contained in three LaTeX sources in
+the `Doc/' directory: if you want include them in the Library manual,
+simply add the following lines
+
+        \input{libPyObjC}
+
+near the end of the file `Doc/lib.tex', just before the inclusion of the
+index (\input{lib.ind}).

pyobjc/Makefile.pre.in

+# Universal Unix Makefile for Python extensions
+# =============================================
+
+# Short Instructions
+# ------------------
+
+# 1. Build and install Python (1.5 or newer).
+# 2. "make -f Makefile.pre.in boot"
+# 3. "make"
+# You should now have a shared library.
+
+# Long Instructions
+# -----------------
+
+# Build *and install* the basic Python 1.5 distribution.  See the
+# Python README for instructions.  (This version of Makefile.pre.in
+# only withs with Python 1.5, alpha 3 or newer.)
+
+# Create a file Setup.in for your extension.  This file follows the
+# format of the Modules/Setup.in file; see the instructions there.
+# For a simple module called "spam" on file "spammodule.c", it can
+# contain a single line:
+#   spam spammodule.c
+# You can build as many modules as you want in the same directory --
+# just have a separate line for each of them in the Setup.in file.
+
+# If you want to build your extension as a shared library, insert a
+# line containing just the string
+#   *shared*
+# at the top of your Setup.in file.
+
+# Note that the build process copies Setup.in to Setup, and then works
+# with Setup.  It doesn't overwrite Setup when Setup.in is changed, so
+# while you're in the process of debugging your Setup.in file, you may
+# want to edit Setup instead, and copy it back to Setup.in later.
+# (All this is done so you can distribute your extension easily and
+# someone else can select the modules they actually want to build by
+# commenting out lines in the Setup file, without editing the
+# original.  Editing Setup is also used to specify nonstandard
+# locations for include or library files.)
+
+# Copy this file (Misc/Makefile.pre.in) to the directory containing
+# your extension.
+
+# Run "make -f Makefile.pre.in boot".  This creates Makefile
+# (producing Makefile.pre and sedscript as intermediate files) and
+# config.c, incorporating the values for sys.prefix, sys.exec_prefix
+# and sys.version from the installed Python binary.  For this to work,
+# the python binary must be on your path.  If this fails, try
+#   make -f Makefile.pre.in Makefile VERSION=1.5 installdir=<prefix>
+# where <prefix> is the prefix used to install Python for installdir
+# (and possibly similar for exec_installdir=<exec_prefix>).
+
+# Note: "make boot" implies "make clobber" -- it assumes that when you
+# bootstrap you may have changed platforms so it removes all previous
+# output files.
+
+# If you are building your extension as a shared library (your
+# Setup.in file starts with *shared*), run "make" or "make sharedmods"
+# to build the shared library files.  If you are building a statically
+# linked Python binary (the only solution of your platform doesn't
+# support shared libraries, and sometimes handy if you want to
+# distribute or install the resulting Python binary), run "make
+# python".
+
+# Note: Each time you edit Makefile.pre.in or Setup, you must run
+# "make Makefile" before running "make".
+
+# Hint: if you want to use VPATH, you can start in an empty
+# subdirectory and say (e.g.):
+#   make -f ../Makefile.pre.in boot srcdir=.. VPATH=..
+
+
+# === Bootstrap variables (edited through "make boot") ===
+
+# The prefix used by "make inclinstall libainstall" of core python
+installdir=	/usr/local
+
+# The exec_prefix used by the same
+exec_installdir=$(installdir)
+
+# Source directory and VPATH in case you want to use VPATH.
+# (You will have to edit these two lines yourself -- there is no
+# automatic support as the Makefile is not generated by
+# config.status.)
+srcdir=		.
+VPATH=		.
+
+# === Variables that you may want to customize (rarely) ===
+
+# (Static) build target
+TARGET=		python
+
+# Installed python binary (used only by boot target)
+PYTHON=		python
+
+# Add more -I and -D options here
+CFLAGS=		$(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS)
+
+# These two variables can be set in Setup to merge extensions.
+# See example[23].
+BASELIB=	
+BASESETUP=	
+
+# === Variables set by makesetup ===
+
+MODOBJS=	_MODOBJS_
+MODLIBS=	_MODLIBS_
+
+# === Definitions added by makesetup ===
+
+# === Variables from configure (through sedscript) ===
+
+VERSION=	@VERSION@
+CC=		@CC@
+LINKCC=		@LINKCC@
+SGI_ABI=	@SGI_ABI@
+OPT=		@OPT@
+LDFLAGS=	@LDFLAGS@
+LDLAST=		@LDLAST@
+DEFS=		@DEFS@
+LIBS=		@LIBS@
+LIBM=		@LIBM@
+LIBC=		@LIBC@
+RANLIB=		@RANLIB@
+MACHDEP=	@MACHDEP@
+SO=		@SO@
+LDSHARED=	@LDSHARED@
+CCSHARED=	@CCSHARED@
+LINKFORSHARED=	@LINKFORSHARED@
+#@SET_CCC@
+
+# Install prefix for architecture-independent files
+prefix=		/usr/local
+
+# Install prefix for architecture-dependent files
+exec_prefix=	$(prefix)
+
+# Uncomment the following two lines for AIX
+#LINKCC= 	$(LIBPL)/makexp_aix $(LIBPL)/python.exp "" $(LIBRARY); $(PURIFY) $(CC)
+#LDSHARED=	$(LIBPL)/ld_so_aix $(CC) -bI:$(LIBPL)/python.exp
+
+# === Fixed definitions ===
+
+# Shell used by make (some versions default to the login shell, which is bad)
+SHELL=		/bin/sh
+
+# Expanded directories
+BINDIR=		$(exec_installdir)/bin
+LIBDIR=		$(exec_prefix)/lib
+MANDIR=		$(installdir)/man
+INCLUDEDIR=	$(installdir)/include
+SCRIPTDIR=	$(prefix)/lib
+
+# Detailed destination directories
+BINLIBDEST=	$(LIBDIR)/python$(VERSION)
+LIBDEST=	$(SCRIPTDIR)/python$(VERSION)
+INCLUDEPY=	$(INCLUDEDIR)/python$(VERSION)
+EXECINCLUDEPY=	$(exec_installdir)/include/python$(VERSION)
+LIBP=		$(exec_installdir)/lib/python$(VERSION)
+DESTSHARED=	$(BINLIBDEST)/site-packages
+
+LIBPL=		$(LIBP)/config
+
+PYTHONLIBS=	$(LIBPL)/libpython$(VERSION).a
+
+MAKESETUP=	$(LIBPL)/makesetup
+MAKEFILE=	$(LIBPL)/Makefile
+CONFIGC=	$(LIBPL)/config.c
+CONFIGCIN=	$(LIBPL)/config.c.in
+SETUP=		$(LIBPL)/Setup.config $(LIBPL)/Setup.local $(LIBPL)/Setup
+
+SYSLIBS=	$(LIBM) $(LIBC)
+
+ADDOBJS=	$(LIBPL)/python.o config.o
+
+# Portable install script (configure doesn't always guess right)
+INSTALL=	$(LIBPL)/install-sh -c
+# Shared libraries must be installed with executable mode on some systems;
+# rather than figuring out exactly which, we always give them executable mode.
+# Also, making them read-only seems to be a good idea...
+INSTALL_SHARED=	${INSTALL} -m 555
+
+# === Fixed rules ===
+
+# Default target.  This builds shared libraries only
+default:	sharedmods
+
+# Build everything
+all:		static sharedmods
+
+# Build shared libraries from our extension modules
+sharedmods:	$(SHAREDMODS)
+
+# Build a static Python binary containing our extension modules
+static:		$(TARGET)
+$(TARGET):	$(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB)
+		$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) \
+		 $(ADDOBJS) lib.a $(PYTHONLIBS) \
+		 $(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \
+		 -o $(TARGET) $(LDLAST)
+
+install:	sharedmods
+		if test ! -d $(DESTSHARED) ; then \
+			mkdir $(DESTSHARED) ; else true ; fi
+		-for i in X $(SHAREDMODS); do \
+			if test $$i != X; \
+			then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
+			fi; \
+		done
+
+# Build the library containing our extension modules
+lib.a:		$(MODOBJS)
+		-rm -f lib.a
+		ar cr lib.a $(MODOBJS)
+		-$(RANLIB) lib.a 
+
+# This runs makesetup *twice* to use the BASESETUP definition from Setup
+config.c Makefile:	Makefile.pre Setup $(BASESETUP) $(MAKESETUP)
+		$(MAKESETUP) \
+		 -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
+		$(MAKE) -f Makefile do-it-again
+
+# Internal target to run makesetup for the second time
+do-it-again:
+		$(MAKESETUP) \
+		 -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
+
+# Make config.o from the config.c created by makesetup
+config.o:	config.c
+		$(CC) $(CFLAGS) -c config.c
+
+# Setup is copied from Setup.in *only* if it doesn't yet exist
+Setup:
+		cp $(srcdir)/Setup.in Setup
+
+# Make the intermediate Makefile.pre from Makefile.pre.in
+Makefile.pre: Makefile.pre.in sedscript
+		sed -f sedscript $(srcdir)/Makefile.pre.in >Makefile.pre
+
+# Shortcuts to make the sed arguments on one line
+P=prefix
+E=exec_prefix
+H=Generated automatically from Makefile.pre.in by sedscript.
+L=LINKFORSHARED
+
+# Make the sed script used to create Makefile.pre from Makefile.pre.in
+sedscript:	$(MAKEFILE)
+	sed -n \
+	 -e '1s/.*/1i\\/p' \
+	 -e '2s%.*%# $H%p' \
+	 -e '/^VERSION=/s/^VERSION=[ 	]*\(.*\)/s%@VERSION[@]%\1%/p' \
+	 -e '/^CC=/s/^CC=[ 	]*\(.*\)/s%@CC[@]%\1%/p' \
+	 -e '/^CCC=/s/^CCC=[ 	]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \
+	 -e '/^LINKCC=/s/^LINKCC=[ 	]*\(.*\)/s%@LINKCC[@]%\1%/p' \
+	 -e '/^OPT=/s/^OPT=[ 	]*\(.*\)/s%@OPT[@]%\1%/p' \
+	 -e '/^LDFLAGS=/s/^LDFLAGS=[ 	]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \
+	 -e '/^LDLAST=/s/^LDLAST=[      ]*\(.*\)/s%@LDLAST[@]%\1%/p' \
+	 -e '/^DEFS=/s/^DEFS=[ 	]*\(.*\)/s%@DEFS[@]%\1%/p' \
+	 -e '/^LIBS=/s/^LIBS=[ 	]*\(.*\)/s%@LIBS[@]%\1%/p' \
+	 -e '/^LIBM=/s/^LIBM=[ 	]*\(.*\)/s%@LIBM[@]%\1%/p' \
+	 -e '/^LIBC=/s/^LIBC=[ 	]*\(.*\)/s%@LIBC[@]%\1%/p' \
+	 -e '/^RANLIB=/s/^RANLIB=[ 	]*\(.*\)/s%@RANLIB[@]%\1%/p' \
+	 -e '/^MACHDEP=/s/^MACHDEP=[ 	]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
+	 -e '/^SO=/s/^SO=[ 	]*\(.*\)/s%@SO[@]%\1%/p' \
+	 -e '/^LDSHARED=/s/^LDSHARED=[ 	]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
+	 -e '/^CCSHARED=/s/^CCSHARED=[ 	]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
+	 -e '/^SGI_ABI=/s/^SGI_ABI=[ 	]*\(.*\)/s%@SGI_ABI[@]%\1%/p' \
+	 -e '/^$L=/s/^$L=[ 	]*\(.*\)/s%@$L[@]%\1%/p' \
+	 -e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
+	 -e '/^$E=/s/^$E=\(.*\)/s%^$E=.*%$E=\1%/p' \
+	 $(MAKEFILE) >sedscript
+	echo "/^#@SET_CCC@/d" >>sedscript
+	echo "/^installdir=/s%=.*%=	$(installdir)%" >>sedscript
+	echo "/^exec_installdir=/s%=.*%=$(exec_installdir)%" >>sedscript
+	echo "/^srcdir=/s%=.*%=		$(srcdir)%" >>sedscript
+	echo "/^VPATH=/s%=.*%=		$(VPATH)%" >>sedscript
+	echo "/^LINKPATH=/s%=.*%=	$(LINKPATH)%" >>sedscript
+	echo "/^BASELIB=/s%=.*%=	$(BASELIB)%" >>sedscript
+	echo "/^BASESETUP=/s%=.*%=	$(BASESETUP)%" >>sedscript
+
+# Bootstrap target
+boot:	clobber
+	VERSION=`$(PYTHON) -c "import sys; print sys.version[:3]"`; \
+	installdir=`$(PYTHON) -c "import sys; print sys.prefix"`; \
+	exec_installdir=`$(PYTHON) -c "import sys; print sys.exec_prefix"`; \
+	$(MAKE) -f $(srcdir)/Makefile.pre.in VPATH=$(VPATH) srcdir=$(srcdir) \
+		VERSION=$$VERSION \
+		installdir=$$installdir \
+		exec_installdir=$$exec_installdir \
+		Makefile
+
+# Handy target to remove intermediate files and backups
+clean:
+		-rm -f *.o *~
+
+# Handy target to remove everything that is easily regenerated
+clobber:	clean
+		-rm -f *.a tags TAGS config.c Makefile.pre $(TARGET) sedscript
+		-rm -f *.so *.sl so_locations
+
+
+# Handy target to remove everything you don't want to distribute
+distclean:	clobber
+		-rm -f Makefile Setup

pyobjc/Makefile.pre.in-old

+# Universal Unix Makefile for Python extensions
+# =============================================
+
+# Lele Gaifax on 8 Dec 1997: slightly edited to fit PyObjC needs.
+#  - Uses makesetup in the $(srcdir) directory, since it supports ObjC.
+#  - Added $(LINKFORSHARED) to the link command.
+
+# Short Instructions
+# ------------------
+
+# 1. Build and install Python (1.5 or newer).
+# 2. "make -f Makefile.pre.in boot"
+# 3. "make"
+# You should now have a shared library.
+
+# Long Instructions
+# -----------------
+
+# Build *and install* the basic Python 1.5 distribution.  See the
+# Python README for instructions.  (This version of Makefile.pre.in
+# only withs with Python 1.5, alpha 3 or newer.)
+
+# Create a file Setup.in for your extension.  This file follows the
+# format of the Modules/Setup.in file; see the instructions there.
+# For a simple module called "spam" on file "spammodule.c", it can
+# contain a single line:
+#   spam spammodule.c
+# You can build as many modules as you want in the same directory --
+# just have a separate line for each of them in the Setup.in file.
+
+# If you want to build your extension as a shared library, insert a
+# line containing just the string
+#   *shared*
+# at the top of your Setup.in file.
+
+# Note that the build process copies Setup.in to Setup, and then works
+# with Setup.  It doesn't overwrite Setup when Setup.in is changed, so
+# while you're in the process of debugging your Setup.in file, you may
+# want to edit Setup instead, and copy it back to Setup.in later.
+# (All this is done so you can distribute your extension easily and
+# someone else can select the modules they actually want to build by
+# commenting out lines in the Setup file, without editing the
+# original.  Editing Setup is also used to specify nonstandard
+# locations for include or library files.)
+
+# Copy this file (Misc/Makefile.pre.in) to the directory containing
+# your extension.
+
+# Run "make -f Makefile.pre.in boot".  This creates Makefile
+# (producing Makefile.pre and sedscript as intermediate files) and
+# config.c, incorporating the values for sys.prefix, sys.exec_prefix
+# and sys.version from the installed Python binary.  For this to work,
+# the python binary must be on your path.  If this fails, try
+#   make -f Makefile.pre.in Makefile VERSION=1.5 installdir=<prefix>
+# where <prefix> is the prefix used to install Python for installdir
+# (and possibly similar for exec_installdir=<exec_prefix>).
+
+# Note: "make boot" implies "make clobber" -- it assumes that when you
+# bootstrap you may have changed platforms so it removes all previous
+# output files.
+
+# If you are building your extension as a shared library (your
+# Setup.in file starts with *shared*), run "make" or "make sharedmods"
+# to build the shared library files.  If you are building a statically
+# linked Python binary (the only solution of your platform doesn't
+# support shared libraries, and sometimes handy if you want to
+# distribute or install the resulting Python binary), run "make
+# python".
+
+# Note: Each time you edit Makefile.pre.in or Setup, you must run
+# "make Makefile" before running "make".
+
+# Hint: if you want to use VPATH, you can start in an empty
+# subdirectory and say (e.g.):
+#   make -f ../Makefile.pre.in boot srcdir=.. VPATH=..
+
+
+# === Bootstrap variables (edited through "make boot") ===
+
+# The prefix used by "make inclinstall libainstall" of core python
+installdir=	/usr/local
+
+# The exec_prefix used by the same
+exec_installdir=$(installdir)
+
+# Source directory and VPATH in case you want to use VPATH.
+# (You will have to edit these two lines yourself -- there is no
+# automatic support as the Makefile is not generated by
+# config.status.)
+srcdir=		.
+VPATH=		.
+
+# === Variables that you may want to customize (rarely) ===
+
+# (Static) build target
+TARGET=		pyobjc
+
+# Installed python binary (used only by boot target)
+PYTHON=		python
+
+# Add more -I and -D options here
+CFLAGS=		$(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS)
+
+# These two variables can be set in Setup to merge extensions.
+# See example[23].
+BASELIB=	
+BASESETUP=	
+
+# === Variables set by makesetup ===
+
+MODOBJS=	_MODOBJS_
+MODLIBS=	_MODLIBS_
+
+# === Definitions added by makesetup ===
+
+# === Variables from configure (through sedscript) ===
+
+VERSION=	@VERSION@
+CC=		@CC@
+LINKCC=		@LINKCC@
+SGI_ABI=	@SGI_ABI@
+OPT=		@OPT@
+LDFLAGS=	@LDFLAGS@
+DEFS=		@DEFS@
+LIBS=		@LIBS@
+LIBM=		@LIBM@
+LIBC=		@LIBC@
+RANLIB=		@RANLIB@
+MACHDEP=	@MACHDEP@
+SO=		@SO@
+LDSHARED=	@LDSHARED@
+CCSHARED=	@CCSHARED@
+LINKFORSHARED=	@LINKFORSHARED@
+#@SET_CCC@
+
+# Install prefix for architecture-independent files
+prefix=		/usr/local
+
+# Install prefix for architecture-dependent files
+exec_prefix=	$(prefix)
+
+# === Fixed definitions ===
+
+# Shell used by make (some versions default to the login shell, which is bad)
+SHELL=		/bin/sh
+
+# Expanded directories
+BINDIR=		$(exec_installdir)/bin
+LIBDIR=		$(exec_prefix)/lib
+MANDIR=		$(installdir)/man
+INCLUDEDIR=	$(installdir)/include
+SCRIPTDIR=	$(prefix)/lib
+
+# Detailed destination directories
+BINLIBDEST=	$(LIBDIR)/python$(VERSION)
+LIBDEST=	$(SCRIPTDIR)/python$(VERSION)
+INCLUDEPY=	$(INCLUDEDIR)/python$(VERSION)
+EXECINCLUDEPY=	$(exec_installdir)/include/python$(VERSION)
+LIBP=		$(exec_installdir)/lib/python$(VERSION)
+DESTSHARED=	$(BINLIBDEST)/site-packages
+
+LIBPL=		$(LIBP)/config
+
+PYTHONLIBS=	$(LIBPL)/libpython$(VERSION).a
+
+MAKESETUP=	$(srcdir)/makesetup
+MAKEFILE=	$(LIBPL)/Makefile
+CONFIGC=	$(LIBPL)/config.c
+CONFIGCIN=	$(LIBPL)/config.c.in
+SETUP=		$(LIBPL)/Setup
+
+SYSLIBS=	$(LIBM) $(LIBC)
+
+ADDOBJS=	$(LIBPL)/python.o config.o
+
+# Portable install script (configure doesn't always guess right)
+INSTALL=	$(LIBPL)/install-sh -c
+# Shared libraries must be installed with executable mode on some systems;
+# rather than figuring out exactly which, we always give them executable mode.
+# Also, making them read-only seems to be a good idea...
+INSTALL_SHARED=	${INSTALL} -m 555
+
+# === Fixed rules ===
+
+# Default target.  This builds shared libraries only
+default:	sharedmods
+
+# Build everything
+all:		static sharedmods
+
+# Build shared libraries from our extension modules
+sharedmods:	$(SHAREDMODS)
+
+# Build a static Python binary containing our extension modules
+static:		$(TARGET)
+$(TARGET):	$(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB)
+		$(OCC) $(LDFLAGS) $(ADDOBJS) lib.a $(PYTHONLIBS) \
+		 $(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \
+		 $(LINKFORSHARED) -o $(TARGET)
+
+install:	sharedmods
+		if test ! -d $(DESTSHARED) ; then \
+			mkdir $(DESTSHARED) ; else true ; fi
+		-for i in X $(SHAREDMODS); do \
+			if test $$i != X; \
+			then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
+			fi; \
+		done
+
+# Build the library containing our extension modules
+lib.a:		$(MODOBJS)
+		-rm -f lib.a
+		ar cr lib.a $(MODOBJS)
+		-$(RANLIB) lib.a 
+
+# This runs makesetup *twice* to use the BASESETUP definition from Setup
+config.c Makefile:	Makefile.pre Setup $(BASESETUP) $(MAKESETUP)
+		$(MAKESETUP) \
+		 -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
+		$(MAKE) -f Makefile do-it-again
+
+# Internal target to run makesetup for the second time
+do-it-again:
+		$(MAKESETUP) \
+		 -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
+
+# Make config.o from the config.c created by makesetup
+config.o:	config.c
+		$(CC) $(CFLAGS) -c config.c
+
+# Setup is copied from Setup.in *only* if it doesn't yet exist
+Setup:
+		cp $(srcdir)/Setup.in Setup
+
+# Make the intermediate Makefile.pre from Makefile.pre.in
+Makefile.pre: Makefile.pre.in sedscript
+		sed -f sedscript $(srcdir)/Makefile.pre.in >Makefile.pre
+
+# Shortcuts to make the sed arguments on one line
+P=prefix
+E=exec_prefix
+H=Generated automatically from Makefile.pre.in by sedscript.
+L=LINKFORSHARED
+
+# Make the sed script used to create Makefile.pre from Makefile.pre.in
+sedscript:	$(MAKEFILE)
+	sed -n \
+	 -e '1s/.*/1i\\/p' \
+	 -e '2s%.*%# $H%p' \
+	 -e '/^VERSION=/s/^VERSION=[ 	]*\(.*\)/s%@VERSION[@]%\1%/p' \
+	 -e '/^CC=/s/^CC=[ 	]*\(.*\)/s%@CC[@]%\1%/p' \
+	 -e '/^CCC=/s/^CCC=[ 	]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \
+	 -e '/^LINKCC=/s/^LINKCC=[ 	]*\(.*\)/s%@LINKCC[@]%\1%/p' \
+	 -e '/^OPT=/s/^OPT=[ 	]*\(.*\)/s%@OPT[@]%\1%/p' \
+	 -e '/^LDFLAGS=/s/^LDFLAGS=[ 	]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \
+	 -e '/^DEFS=/s/^DEFS=[ 	]*\(.*\)/s%@DEFS[@]%\1%/p' \
+	 -e '/^LIBS=/s/^LIBS=[ 	]*\(.*\)/s%@LIBS[@]%\1%/p' \
+	 -e '/^LIBM=/s/^LIBM=[ 	]*\(.*\)/s%@LIBM[@]%\1%/p' \
+	 -e '/^LIBC=/s/^LIBC=[ 	]*\(.*\)/s%@LIBC[@]%\1%/p' \
+	 -e '/^RANLIB=/s/^RANLIB=[ 	]*\(.*\)/s%@RANLIB[@]%\1%/p' \
+	 -e '/^MACHDEP=/s/^MACHDEP=[ 	]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
+	 -e '/^SO=/s/^SO=[ 	]*\(.*\)/s%@SO[@]%\1%/p' \
+	 -e '/^LDSHARED=/s/^LDSHARED=[ 	]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
+	 -e '/^CCSHARED=/s/^CCSHARED=[ 	]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
+	 -e '/^$L=/s/^$L=[ 	]*\(.*\)/s%@$L[@]%\1%/p' \
+	 -e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
+	 -e '/^$E=/s/^$E=\(.*\)/s%^$E=.*%$E=\1%/p' \
+	 $(MAKEFILE) >sedscript
+	echo "/^#@SET_CCC@/d" >>sedscript
+	echo "/^installdir=/s%=.*%=	$(installdir)%" >>sedscript
+	echo "/^exec_installdir=/s%=.*%=$(exec_installdir)%" >>sedscript
+	echo "/^srcdir=/s%=.*%=		$(srcdir)%" >>sedscript
+	echo "/^VPATH=/s%=.*%=		$(VPATH)%" >>sedscript
+	echo "/^LINKPATH=/s%=.*%=	$(LINKPATH)%" >>sedscript
+	echo "/^BASELIB=/s%=.*%=	$(BASELIB)%" >>sedscript
+	echo "/^BASESETUP=/s%=.*%=	$(BASESETUP)%" >>sedscript
+
+# Bootstrap target
+boot:	clobber
+	VERSION=`$(PYTHON) -c "import sys; print sys.version[:3]"`; \
+	installdir=`$(PYTHON) -c "import sys; print sys.prefix"`; \
+	exec_installdir=`$(PYTHON) -c "import sys; print sys.exec_prefix"`; \
+	$(MAKE) -f $(srcdir)/Makefile.pre.in VPATH=$(VPATH) srcdir=$(srcdir) \
+		VERSION=$$VERSION \
+		installdir=$$installdir \
+		exec_installdir=$$exec_installdir \
+		Makefile
+
+# Handy target to remove intermediate files and backups
+clean:
+		-rm -f *.o *~
+
+# Handy target to remove everything that is easily regenerated
+clobber:	clean
+		-rm -f *.a tags TAGS config.c Makefile.pre $(TARGET) sedscript
+		-rm -f *.so *.sl so_locations
+
+
+# Handy target to remove everything you don't want to distribute
+distclean:	clobber
+		-rm -f Makefile Setup
+# -*- indented-text -*-
+#
+# This file is part of the PyObjC package.
+#
+
+WHAT'S NEW:
+
+Version 2000-11-14 (November 14, 2000):
+
+- GNU_RUNTIME is likely completely broken
+
+- Compiles on Mac OS X Server (python 2.0)
+
+- Compiles on Mac OS X (python 2.0)
+
+- Works as either a dynamically loadable module or statically built
+  into a python executable
+
+- Requires a modified makesetup to work [patches have been sent to
+  SourceForge.net's Python project].
+
+- Supports NSAutoReleasepool.
+
+- Some pre-OSX stuff removed;  references to old APIs, etc... (but
+  nowhere near clean)
+
+Version 0.55, 18 August 1998:
+
+- Here again, supporting GNU_RUNTIME and GNUstep Base! On my new Linux
+  box I can finally test the module against them: I installed the
+  latest snapshot of gstep-core, that contains the base library
+  too. Given a sane GNUstep env (GNUSTEP_XXX env vars), you should be
+  able to build a static ObjC-ized interpreter by:
+    o Adjusting Setup, commenting out NeXT definition and enabling GNU
+      ones;
+    o make -f Makefile.pre.in boot
+    o make static
+
+Version 0.54, 24 March 1998:
+
+- OC_Pasteboard.[hm], OC_Stream.[mh] and ObjCStreams.m are definitively gone.
+- OC_PythonObject derives from NSProxy.
+
+Version 0.53, 4 January 1998:
+
+- Tons of changes, retargeting the core functionality around the
+  OpenSTEP API. This release basically matches the previous one
+  in terms of functionalities, but is should be closer to GNUstep.
+- OC_Streams and OC_Pasteboard aren't supported, I've not yet decided
+  if they are needed anymore.
+- Updated LittleButtonedWindow demo.
+
+Version 0.47, 29 October 1996:
+
+- Misc/Makefile.pre.in automatically sets TARGET to `pyobjc'.
+- ObjC.m splitted to ObjCObject.m ObjCMethod.m ObjCPointer.m
+  ObjCRuntime.m.
+- New (almost invisible) types: ObjCSequenceObject and
+  ObjCMappingObject; this to implement sequence and mapping syntax
+  (several mapping methods have stub implementation).
+- OC_Pasteboard class is gone. Its functionalities are now in a
+  category of Pasteboard/NSPasteboard.
+- Better methods doc.
+- PyArg_ParseTuple format strings contain arguments names.
+- OC_Streams are mapped to ObjCStreams by pythonify_c_value and its
+  counterpart.
+
+Version 0.46, 18 October 1996:
+
+- OC_Stream is now a subclass of NSData under Foundation.
+- New Objective-C class: OC_Pasteboard. Use it instead of Pasteboard/
+  NSPasteboard. 
+- New Objective-C class: OC_PythonBundle. Use it instead of NXBundle/NSBundle.
+  The ShellText demo has been upgraded to use it, and now you can run it
+  directly from the WorkSpace.
+- OC_Python.[hm] aren't in the package anymore.
+- Setup.in directives changed again, due to OC_Python.m dropping.
+
+Version 0.45, 14 October 1996:
+
+- Double syntax: to make it easier for us to test and choose the
+  better candidate, the only one that will be present in the final 1.0
+  release. Keeping both would result in a speed penality.
+- Revisited streams, in particular GNUstep support.
+
+Version 0.44, 9 October 1996:
+
+- Integers are now accepted too where floats or doubles are expected.
+- New method: ObjC.make_pointer (1) returns an ObjCPointer containing
+  ((void *) 1).
+
+Version 0.43, 7 October 1996:
+
+- Completed ObjCStream implementation. There is now a new module, ObjCStreams
+  which is automatically loaded by ObjC. You can access it as ObjC.streams.
+- Manual splitted in three parts: libPyObjC.tex with the chapter intro,
+  libObjC.tex describing the main module, libObjCStreams.tex explains the
+  stream facilities.
+
+Version 0.42, 4 October 1996:
+
+- You can pass initialization arguments when using the Class() syntax. You
+  select the right initializer selector with the `init' keyword parameter.
+- First cut on ObjCStream objects. Thanx to Bill Bumgarner for motivations.
+- New demo ShellText, to test above points.
+
+Version 0.41, 2 October 1996:
+
+- Revised error messages: for arguments type mismatch they show the ObjC type
+  expected.
+- When a method returns a pointer to something, it gets translated as an
+  ObjCPointer object, not the pythonified pointed value. When a method
+  expects a pointer argument, it accepts such an object as well.
+- New demo: Fred. To halt it, suspend the Python process with ^Z then kill
+  it ;-).
+- Setup.in directives changed. See the new file Modules/Setup.PyObjC.in
+- Distribuited as a standalone package. Special thanks to Bill Bumgarner.
+
+Version 0.4, 27 September 1996:
+
+- Now handles methods returning doubles or floats.
+- ObjCRuntime responds to .sel_is_mapped().
+
+Version 0.31, 26 September 1996:
+
+- It's now possible to use a different strategy to map ObjC method names to
+  Python ones. Sooner or later we should decide the one to go, and drop the
+  other. For details, see comments on PYTHONIFY_WITH_DOUBLE_UNDERSCORE in
+  objc_support.h.
+- Manual section.
+- ObjC.runtime.__dict__ added.
+- ObjC.runtime.kind added.
+
+Version 0.3, 20 September 1996:
+
+- No user visible changes, just a little effort towards GNU_RUNTIME support. 
+
+Version 0.2, 16 September 1996:
+
+- Accepts a struct.pack() string for pointer arguments, but...
+- ... New methods on ObjCMethod: .pack_argument and .unpack_argument:
+  these should be used whenever an ObjC method expects a passed-by-reference
+  argument; for example, on NeXTSTEP [View getFrame:] expects a pointer
+  to an NXRect structure, that it will fill with the current frame of the
+  view: in this case you should use something similar to
+        framep = aView.getFrame__.pack_argument (0)
+        aView.getFrame__ (framep)
+        frame = aView.getFrame__.unpack_argument (0, framep)
+
+Version 0.1, 13 September 1996:
+
+- Correctly handle pointer arguments.
+- New syntax to get a class: ObjC.runtime.NameOfClass
+- New syntax aliasing .new(): SomeClass()
+- New Demo: LittleButtonedWindow, that tests points above.
+- What follow is the recipe to get PyObjC dinamically loadable on NeXTSTEP:
+        * apply the patch in Misc/INSTALL.PyObjC to Python/importdl.c
+        * modify Python/Makefile adding the switch ``-ObjC'' to the importdl.o
+          build rule:
+          importdl.o:   importdl.c
+                $(CC) -ObjC -c $(CFLAGS) -I$(DLINCLDIR) $(srcdir)/importdl.c
+        * modify Modules/Setup moving the PyObjC entry suggested above AFTER
+          ``*shared*'', and remove ``-u libNeXT_s -lNeXT_s'' from it.
+        * run ``make'': this will update various files, in particular
+          Modules/Makefile.
+        * modify Modules/Makefile adding ``-u libNeXT_s -lNeXT_s'' to SYSLIBS:
+          SYSLIBS=      $(LIBM) $(LIBC) -u libNeXT_s -lNeXT_s
+        * run ``make'' again
+

pyobjc/OC_PythonBundle.h

+/* Copyright (c) 1996,97 by Lele Gaifax.  All Rights Reserved
+ *
+ * This software may be used and distributed freely for any purpose
+ * provided that this notice is included unchanged on any and all
+ * copies. The author does not warrant or guarantee this software in
+ * any way.
+ *
+ * This file is part of the PyObjC package.
+ *
+ * RCSfile: OC_PythonBundle.h,v
+ * Revision: 1.8
+ * Date: 1998/08/18 15:35:50
+ *
+ * Created Wed Oct 16 17:35:05 1996.
+ * Thanx to Bill Bumgarner for the idea and first implementation.
+ */
+
+#ifndef _OC_PythonBundle_H
+#define _OC_PythonBundle_H
+
+#import <Foundation/NSBundle.h>
+
+/*#C This class fills specific Python needs about bundles. */  
+@interface OC_PythonBundle : NSBundle
+{
+}
+
+//#M Initialize the version number of this class.
++ (void) initialize;
+
+/*#M Find the name of the main script in  execution, and return a
+  bundle relative to the script's pathname; if we are in interactive
+  mode, a bundle on the current working directory is returned. */
++ (NSBundle *) mainBundle;
+
+@end
+
+#endif /* _OC_PythonBundle_H */

pyobjc/OC_PythonBundle.m

+/* Copyright (c) 1996,97 by Lele Gaifax.  All Rights Reserved
+ *
+ * This software may be used and distributed freely for any purpose
+ * provided that this notice is included unchanged on any and all
+ * copies. The author does not warrant or guarantee this software in
+ * any way.
+ *
+ * This file is part of the PyObjC package.
+ *
+ * RCSfile: OC_PythonBundle.m,v
+ * Revision: 1.8
+ * Date: 1998/08/18 15:35:51
+ *
+ * Created Wed Oct 16 17:39:54 1996.
+ */
+
+#include "ObjC.h"
+#include "OC_PythonBundle.h"
+
+#import <Foundation/NSString.h> /* sdm7g -- chg #include to #import */
+
+#include "Python.h"
+#include "compile.h"
+#include "frameobject.h"
+
+#include <sys/param.h>
+
+#define CLASS_VERSION 0
+
+@implementation OC_PythonBundle
+
++ (void) initialize
+{
+  if (self == [OC_PythonBundle class])
+    {
+      [OC_PythonBundle setVersion:CLASS_VERSION];
+    }
+}
+
++ (NSBundle *) mainBundle
+{
+  static NSBundle *mainScriptBundle = nil;
+
+  if (!mainScriptBundle)
+    {
+      PyFrameObject *frame = (PyFrameObject *) PyEval_GetFrame();
+      const char *mainscript;
+
+      /* go back to the first frame */
+      while (frame->f_back)
+        frame = frame->f_back;
+      
+      mainscript = PyString_AsString (frame->f_code->co_filename);
+      if (strcmp (mainscript, "<stdin>"))
+        {
+          const char *lslash = strrchr (mainscript, '/');
+          
+          if (lslash)
+            {
+              unsigned int len = lslash - mainscript;
+              char pathbuf[len + 1];
+
+              memcpy (pathbuf, mainscript, len);
+              pathbuf[len] = 0;
+
+              mainScriptBundle = [NSBundle alloc];
+              [mainScriptBundle initWithPath:
+                                  [NSString stringWithCString:pathbuf]];
+            }
+        }
+
+      if (!mainScriptBundle)
+        {
+          char cwdbuf[1024];
+          extern const char *getcwd (char *, unsigned int);
+          
+          if (getcwd (cwdbuf, sizeof (cwdbuf)))
+            {
+              mainScriptBundle = [NSBundle alloc];
+              [mainScriptBundle initWithPath:
+                                  [NSString stringWithCString:cwdbuf]];
+            }
+        }
+    }
+
+  return mainScriptBundle;
+}
+
+@end /* OC_PythonBundle class implementation */

pyobjc/OC_PythonInt.h

+/* Copyright (c) 1996,97 by Lele Gaifax.  All Rights Reserved
+ *
+ * This software may be used and distributed freely for any purpose
+ * provided that this notice is included unchanged on any and all
+ * copies. The author does not warrant or guarantee this software in
+ * any way.
+ *
+ * This file is part of the PyObjC package.
+ *
+ * RCSfile: OC_PythonInt.h,v
+ * Revision: 1.8
+ * Date: 1998/01/04 17:59:16
+ *
+ * Created Thu Sep  5 20:28:35 1996.
+ */
+
+#ifndef _OC_PythonInt_H
+#define _OC_PythonInt_H
+
+#include "OC_PythonObject.h"
+
+/*#C This class wraps a PyInt object, making it easier to handle this
+  kind of objects from Objective-C. */
+@interface OC_PythonInt : OC_PythonObject
+{
+}
+
+//#M Initialize the version number of this class.
++ (void) initialize;
+
+//#M Returns a new autoreleased PyInt object with @var{i} as contents.
++ (id <PythonObject>) fromLong:(long) i;
+
+//#M Returns the ``C'' equivalent.
+- (long) asLong;
+
+@end /* OC_PythonInt class interface */
+
+
+#endif /* _OC_PythonInt_H */

pyobjc/OC_PythonInt.m

+/* Copyright (c) 1996,97 by Lele Gaifax.  All Rights Reserved
+ *
+ * This software may be used and distributed freely for any purpose
+ * provided that this notice is included unchanged on any and all
+ * copies. The author does not warrant or guarantee this software in
+ * any way.
+ *
+ * This file is part of the PyObjC package.
+ *
+ * RCSfile: OC_PythonInt.m,v
+ * Revision: 1.9
+ * Date: 1998/01/04 17:59:17
+ *
+ * Created Thu Sep  5 20:29:52 1996.
+ */
+
+#include "OC_PythonInt.h"
+
+#define CLASS_VERSION 0
+
+@implementation OC_PythonInt
++ (void) initialize
+{
+/*
+  // NSProxy does not implement +setVersion:
+  if (self == [OC_PythonInt class])
+    {
+      [OC_PythonInt setVersion:CLASS_VERSION];
+    }
+*/
+}
+
++ (id <PythonObject>) fromLong:(long) i
+{
+  PyObject *pyint = PyInt_FromLong (i);
+  id <PythonObject> result = [self newWithObject:pyint];
+
+  Py_DECREF(pyint);
+  return result;
+}
+
+- (long) asLong
+{
+  return PyInt_AsLong ([self pyObject]);
+}
+
+
+@end /* OC_PythonInt class implementation */

pyobjc/OC_PythonObject.h

+/* Copyright (c) 1996,97 by Lele Gaifax.  All Rights Reserved
+ *
+ * This software may be used and distributed freely for any purpose
+ * provided that this notice is included unchanged on any and all
+ * copies. The author does not warrant or guarantee this software in
+ * any way.
+ *
+ * This file is part of the PyObjC package.
+ *
+ * RCSfile: OC_PythonObject.h,v
+ * Revision: 1.16
+ * Date: 1998/08/18 15:35:51
+ *
+ * Created Wed Sep  4 18:36:15 1996.
+ */
+
+/* This is basically the implementation of the Python Abstract Layer
+   API in Objective-C. */
+   
+#ifndef _OC_PythonObject_H
+#define _OC_PythonObject_H
+
+#include "ObjC.h"
+
+#import <Foundation/Foundation.h>
+
+@protocol PythonObject
+
+/*#M Return the wrapped Python object. */
+- (PyObject *) pyObject;
+
+/*#M Print the PythonObject on file @var{fp}.  Returns -1 on
+  error.  The @var{flags} argument is used to enable certain printing
+  options. The only option currently supported is @code{Py_Print_RAW}. */
+- (int) print:(FILE *) fp flags:(int) flags;
+
+/*#M Returns 1 if the PythonObject has the attribute @var{attr_name},
+  and 0 otherwise.
+
+  This is equivalent to the Python expression:  hasattr (o,attr_name). */
+- (int) hasAttrCString:(char *) attr_name;
+- (int) hasAttrString:(NSString *) attr_name;
+
+/*#M Retrieve an attributed named @var{attr_name} from object o.
+  Returns the attribute value on success, or NULL on failure.
+
+  This is the equivalent of the Python expression: o.attr_name. */
+- (id <PythonObject>) getAttrCString:(char *) attr_name;
+- (id <PythonObject>) getAttrString:(NSString *) attr_name;
+
+/*#M Returns 1 if o has the attribute attr_name, and 0 otherwise.
+  This is equivalent to the Python expression:  hasattr(o,attr_name). */
+- (int) hasAttr:(id <PythonObject>) attr_name;
+
+/*#M Retrieve an attributed named attr_name form object o.
+  Returns the attribute value on success, or NULL on failure.
+  This is the equivalent of the Python expression: o.attr_name. */
+- (id <PythonObject>) getAttr:(id <PythonObject>) attr_name;
+
+/*#M Set the value of the attribute named attr_name, for object o,
+  to @var{value}. Returns -1 on failure.  This is
+  the equivalent of the Python statement: o.attr_name=value. */
+- (int) setAttrCString:(char *) attr_name value:(id <PythonObject>) value;
+- (int) setAttrString:(NSString *) attr_name value:(id <PythonObject>) value;
+
+/*#M Set the value of the attribute named attr_name, for object o,
+  to the @var{value}. Returns -1 on failure.  This is
+  the equivalent of the Python statement: o.attr_name=value. */
+- (int) setAttr:(id <PythonObject>) attr_name value:(id <PythonObject>) value;
+
+/*#M Delete attribute named attr_name, for object o. Returns
+  -1 on failure.  This is the equivalent of the Python
+  statement: del o.attr_name. */
+- (int) delAttrCString:(char *) attr_name;
+- (int) delAttrString:(NSString *) attr_name;
+
+/*#M Delete attribute named attr_name, for object o. Returns
+  -1 on failure.  This is the equivalent of the Python
+  statement: del o.attr_name. */
+- (int) delAttr:(id <PythonObject>) attr_name;
+
+/*#M Compare the values of o1 and o2 using a routine provided by
+  o1, if one exists, otherwise with a routine provided by o2.
+  The result of the comparison is returned in result.  Returns
+  -1 on failure.  This is the equivalent of the Python
+  statement: result=cmp(o1,o2). */
+- (int) cmp:(id <PythonObject>) o2 result:(int *) result;
+
+/*#M Compare the values of o1 and o2 using a routine provided by
+  o1, if one exists, otherwise with a routine provided by o2.
+  Returns the result of the comparison on success.  On error,
+  the value returned is undefined. This is equivalent to the
+  Python expression: cmp(o1,o2). */
+- (int) compare:(id <PythonObject>) o2;
+
+/*#M Compute the string representation of object, o.  Returns the
+  string representation on success, NULL on failure.  This is
+  the equivalent of the Python expression: repr(o). */
+- (id <PythonObject>) repr;
+
+/*#M Compute the string representation of object, o.  Returns the
+  string representation on success, NULL on failure.  This is
+  the equivalent of the Python expression: str(o). */
+- (id <PythonObject>) str;
+
+/*#M Compute and return the hash, hash_value, of an object, o.  On
+  failure, raise an Exception.  This is the equivalent of the Python
+  expression: hash(o). */
+- (unsigned int) hash;
+
+/*#M Returns 1 if the object, o, is considered to be true, and
+  0 otherwise. This is equivalent to the Python expression:
+  not not o */
+- (int) isTrue;
+
+/*#M On success, returns a type object corresponding to the object
+  type of object o. On failure, returns NULL.  This is
+  equivalent to the Python expression: type(o). */
+- (id <PythonObject>) type;
+
+/*#M Return the length of object o.  If the object, o, provides
+  both sequence and mapping protocols, the sequence length is
+  returned. Raise an Exception On error.  This is the equivalent
+  to the Python expression: len(o). */
+- (unsigned int) length;
+
+/*#M Equivalent to @code{-length}. */
+- (unsigned int) count;
+
+/*#M Return element of o corresponding to the object, key, or NULL
+  on failure. This is the equivalent of the Python expression:
+  o[key]. */
+- (id <PythonObject>) getItem:(id <PythonObject>) key;
+
+/*#M Map the object, key, to the value, v.  Returns
+  -1 on failure.  This is the equivalent of the Python
+  statement: o[key]=v. */
+- (int) setItem:(id <PythonObject>) key value:(id <PythonObject>) v;
+
+/*#M Delete the mapping for key from *o.  Returns -1 on failure.
+  This is the equivalent of the Python statement: del o[key]. */
+- (int) delItem:(id <PythonObject>) key;
+
+@end /* PythonObject protocol */
+
+@protocol PythonNumbering
+
+/*#M Returns 1 if the object, o, provides numeric protocols, and
+  false otherwise. */
+- (int) numberCheck;
+
+/*#M Returns the result of adding o1 and o2, or null on failure.
+  This is the equivalent of the Python expression: o1+o2. */
+- (id <PythonObject>) numberAdd:(id <PythonObject>) o2;
+
+/*#M Returns the result of subtracting o2 from o1, or null on
+  failure.  This is the equivalent of the Python expression: o1-o2. */
+- (id <PythonObject>) numberSubtract:(id <PythonObject>) o2;
+
+/*#M Returns the result of multiplying o1 and o2, or null on
+  failure.  This is the equivalent of the Python expression: o1*o2. */
+- (id <PythonObject>) numberMultiply:(id <PythonObject>) o2;
+
+/*#M Returns the result of dividing o1 by o2, or null on failure.
+  This is the equivalent of the Python expression: o1/o2. */
+- (id <PythonObject>) numberDivide:(id <PythonObject>) o2;
+
+/*#M Returns the remainder of dividing o1 by o2, or null on
+  failure.  This is the equivalent of the Python expression: o1%o2. */
+- (id <PythonObject>) numberRemainder:(id <PythonObject>) o2;
+
+/*#M See the built-in function divmod.  Returns NULL on failure.
+  This is the equivalent of the Python expression: divmod(o1,o2). */
+- (id <PythonObject>) numberDivmod:(id <PythonObject>) o2;
+
+/*#M See the built-in function pow.  Returns NULL on failure.
+  This is the equivalent of the Python expression: pow(o1,o2,o3),
+  where o3 is optional. */
+- (id <PythonObject>) numberPower:(id <PythonObject>) o2
+                                 :(id <PythonObject>) o3;
+
+/*#M Returns the negation of o on success, or null on failure.
+  This is the equivalent of the Python expression: -o. */
+- (id <PythonObject>) numberNegative;
+
+/*#M Returns the (what?) of o on success, or NULL on failure.
+  This is the equivalent of the Python expression: +o. */
+- (id <PythonObject>) numberPositive;
+
+/*#M Returns the absolute value of o, or null on failure.  This is
+  the equivalent of the Python expression: abs(o). */
+- (id <PythonObject>) numberAbsolute;
+
+/*#M Returns the bitwise negation of o on success, or NULL on
+  failure.  This is the equivalent of the Python expression: ~o. */
+- (id <PythonObject>) numberInvert;
+
+/*#M Returns the result of left shifting o1 by o2 on success, or
+  NULL on failure.  This is the equivalent of the Python
+  expression: o1 << o2. */
+- (id <PythonObject>) numberLshift:(id <PythonObject>) o2;
+
+/*#M Returns the result of right shifting o1 by o2 on success, or
+  NULL on failure.  This is the equivalent of the Python
+  expression: o1 >> o2. */
+- (id <PythonObject>) numberRshift:(id <PythonObject>) o2;
+
+/*#MReturns the result of bitwise and of o1 and o2 on success, or
+  NULL on failure. This is the equivalent of the Python
+  expression: o1&o2. */
+- (id <PythonObject>) numberAnd:(id <PythonObject>) o2;
+
+/*#M Returns the bitwise exclusive or of o1 by o2 on success, or
+  NULL on failure.  This is the equivalent of the Python
+  expression: o1^o2. */
+- (id <PythonObject>) numberXor:(id <PythonObject>) o2;
+
+/*#M Returns the result of bitwise or of o1 and o2 on success, or
+  NULL on failure.  This is the equivalent of the Python
+  expression: o1|o2. */
+- (id <PythonObject>) numberOr:(id <PythonObject>) o2;
+
+/* XXX COERCE IS MISSING:
+        int PyNumber_Coerce(PyObject **o1, PyObject **o2);
+
+         This function takes the addresses of two variables of type
+         PyObject*.
+
+         If the objects pointed to by *p1 and *p2 have the same type,
+         increment their reference count and return 0 (success).
+         If the objects can be converted to a common numeric type,
+         replace *p1 and *p2 by their converted value (with 'new'
+         reference counts), and return 0.
+         If no conversion is possible, or if some other error occurs,
+         return -1 (failure) and don't increment the reference counts.
+         The call PyNumber_Coerce(&o1, &o2) is equivalent to the Python
+         statement o1, o2 = coerce(o1, o2).
+
+       */
+
+/*#M Returns the o converted to an integer object on success, or
+  NULL on failure.  This is the equivalent of the Python
+  expression: int(o). */
+- (id <PythonObject>) numberInt;
+
+/*#M Returns the o converted to a long integer object on success,
+  or NULL on failure.  This is the equivalent of the Python
+  expression: long(o). */
+- (id <PythonObject>) numberLong;
+
+/*#M Returns the o converted to a float object on success, or NULL
+  on failure.  This is the equivalent of the Python expression:
+  float(o). */
+- (id <PythonObject>) numberFloat;
+
+@end /* PythonNumbering protocol */
+
+@protocol PythonSequencing
+
+/*#M Return 1 if the object provides sequence protocol, and zero
+  otherwise. */
+- (int) sequenceCheck;
+
+/*#M Return the length of sequence object o, or -1 on failure. */
+- (int) sequenceLength;
+
+/*#M Return the concatination of o1 and o2 on success, and NULL on
+  failure.   This is the equivalent of the Python
+  expression: o1+o2. */
+- (id <PythonObject>) sequenceConcat:(id <PythonObject>) o2;
+
+/*#M Return the result of repeating sequence object o count times,
+  or NULL on failure.  This is the equivalent of the Python
+  expression: o1*count. */
+- (id <PythonObject>) sequenceRepeat:(int) count;
+
+/*#M Return the ith element of o, or NULL on failure. This is the
+  equivalent of the Python expression: o[i]. */
+- (id <PythonObject>) sequenceGetItem:(int) i;
+
+/*#M Return the slice of sequence object o between i1 and i2, or
+  NULL on failure. This is the equivalent of the Python
+  expression: o[i1:i2]. */
+- (id <PythonObject>) sequenceGetSliceFrom:(int) i1 to:(int) i2;
+
+/*#M Assign object v to the ith element of o.  Returns
+  -1 on failure.  This is the equivalent of the Python
+  statement: o[i]=v. */
+- (int) sequenceSetItem:(int) i value:(id <PythonObject>) v;
+
+/*#M Delete the ith element of object v.  Returns
+  -1 on failure.  This is the equivalent of the Python
+  statement: del o[i]. */
+- (int) sequenceDelItem:(int) i;
+
+/*#M Assign the sequence object, v, to the slice in sequence
+  object, o, from i1 to i2.  Returns -1 on failure. This is the
+  equivalent of the Python statement: o[i1:i2]=v. */
+- (int) sequenceSetSliceFrom:(int) i1
+                          to:(int) i2
+                       value:(id <PythonObject>) v;
+
+/*#M Delete the slice in sequence object, o, from i1 to i2.
+  Returns -1 on failure. This is the equivalent of the Python
+  statement: del o[i1:i2]. */
+- (int) sequenceDelSliceFrom:(int) i1 to:(int) i2;
+
+/*#M Returns the sequence, o, as a tuple on success, and NULL on failure.
+  This is equivalent to the Python expression: tuple(o) */
+- (id <PythonObject>) sequenceTuple;
+
+/*#M Returns the sequence, o, as a list on success, and NULL on failure.
+  This is equivalent to the Python expression: list(o). */
+- (id <PythonObject>) sequenceList;
+
+/*#M Return the number of occurrences on value on o, that is,
+  return the number of keys for which o[key]==value.  On
+  failure, return -1.  This is equivalent to the Python
+  expression: o.count(value). */
+- (int) sequenceCount:(id <PythonObject>) value;
+
+/*#M Determine if o contains value.  If an item in o is equal to
+  X, return 1, otherwise return 0.  On error, return -1.  This
+  is equivalent to the Python expression: value in o. */
+- (int) sequenceIn:(id <PythonObject>) value;
+
+/*#M Return the first index for which o[i]=value.  On error,
+  return -1.    This is equivalent to the Python
+  expression: o.index(value). */
+- (int) sequenceIndex:(id <PythonObject>) value;
+
+@end /* PythonSequencing protocol */
+
+@protocol PythonCalling
+
+/*#M Determine if the object, o, is callable.  Return 1 if the
+  object is callable and 0 otherwise. */
+- (int) callableCheck;
+
+/*#M Call a callable Python object, callable_object, with
+  arguments given by the tuple, args.  If no arguments are
+  needed, then args may be NULL.  Returns the result of the
+  call on success, or NULL on failure.  This is the equivalent