Tim Peters 
								
							 
						 
						
							
							
							
							
								
							
							
								3d7d372ce3 
								
							 
						 
						
							
							
								
								Whitespace normalization, via reindent.py.  
							
							 
							
							
							
						 
						
							2004-07-18 06:25:50 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Tim Peters 
								
							 
						 
						
							
							
							
							
								
							
							
								5960d80e11 
								
							 
						 
						
							
							
								
								s/it's/its/, s/NULL/NULL{}/, where appropriate.  
							
							 
							
							
							
						 
						
							2004-07-15 04:23:13 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Tim Peters 
								
							 
						 
						
							
							
							
							
								
							
							
								eda29306b3 
								
							 
						 
						
							
							
								
								Formalize that the Py_VISIT macro requires that the tp_traverse  
							
							 
							
							... 
							
							
							
							implementation it's used in must give its arguments specific names. 
							
						 
						
							2004-07-15 04:05:59 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								7a0e8bc283 
								
							 
						 
						
							
							
								
								Updated documentation to:  
							
							 
							
							... 
							
							
							
							- point out the importance of reassigning data members before
  assigning thier values
- correct my missconception about return values from visitprocs. Sigh.
- mention the labor saving Py_VISIT and Py_CLEAR macros. 
							
						 
						
							2004-07-14 19:07:24 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Brett Cannon 
								
							 
						 
						
							
							
							
							
								
							
							
								289e4cba1c 
								
							 
						 
						
							
							
								
								Changed applicable use of `char *` declarations that are passed into  
							
							 
							
							... 
							
							
							
							PyArg_ParseTuple() to ``const char *`` to match the recommendation made in
section 1.3 and to support better coding habits.
Section 1.8 ("Keyword Parameters for Extension Functions") and it's coding
example were not touched since it is stems from an accredited source and thus
did not want to step on anyone's toes. 
							
						 
						
							2004-06-29 03:48:23 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Brett Cannon 
								
							 
						 
						
							
							
							
							
								
							
							
								634893d1a3 
								
							 
						 
						
							
							
								
								Mention Py_RETURN_NONE when introducing the idiom of how to have a function  
							
							 
							
							... 
							
							
							
							return Py_None. 
							
						 
						
							2004-06-27 04:28:00 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Brett Cannon 
								
							 
						 
						
							
							
							
							
								
							
							
								555a96475d 
								
							 
						 
						
							
							
								
								Clarify sentence at end of Intermezzo section stating that PyMODINIT_FUNC will  
							
							 
							
							... 
							
							
							
							be discussed later by saying it is the function return type of the sample code
to make spotting it easier. 
							
						 
						
							2004-06-26 23:10:32 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Phillip J. Eby 
								
							 
						 
						
							
							
							
							
								
							
							
								de48307f76 
								
							 
						 
						
							
							
								
								Added documentation to address SF bug  #963246 : limitations on multiple  
							
							 
							
							... 
							
							
							
							inheritance in Python when a C type is one of the bases. 
							
						 
						
							2004-06-06 15:59:18 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Fred Drake 
								
							 
						 
						
							
							
							
							
								
							
							
								34c43202eb 
								
							 
						 
						
							
							
								
								Emphasize the requirement that Python.h be included first more strongly.  
							
							 
							
							... 
							
							
							
							Closes SF bug #837228 ; backporting for Python 2.3.4. 
							
						 
						
							2004-03-31 07:45:46 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Neal Norwitz 
								
							 
						 
						
							
							
							
							
								
							
							
								d311f1fb9b 
								
							 
						 
						
							
							
								
								SF  #894428 , fix typo  
							
							 
							
							
							
						 
						
							2004-02-10 18:07:16 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Fred Drake 
								
							 
						 
						
							
							
							
							
								
							
							
								0d8da3a622 
								
							 
						 
						
							
							
								
								fix some sloppy markup to use \guilabel  
							
							 
							
							
							
						 
						
							2004-01-23 09:01:56 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Raymond Hettinger 
								
							 
						 
						
							
							
							
							
								
							
							
								2619c9ec89 
								
							 
						 
						
							
							
								
								SF patch  #838938 :  Typos in the docs (Extending/Embedding + Python/C API)  
							
							 
							
							... 
							
							
							
							(Contributed by Florent Rougon.) 
							
						 
						
							2003-12-07 11:40:17 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Michael W. Hudson 
								
							 
						 
						
							
							
							
							
								
							
							
								ff1f194982 
								
							 
						 
						
							
							
								
								Fix the problem addressed by patch  
							
							 
							
							... 
							
							
							
							[ 819012 ] Fix for former/latter confusion in Extending documentation
although not by using supplied patch. 
							
						 
						
							2003-11-07 11:45:34 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Walter Dörwald 
								
							 
						 
						
							
							
							
							
								
							
							
								f0dfc7ac5c 
								
							 
						 
						
							
							
								
								Fix a bunch of typos in documentation, docstrings and comments.  
							
							 
							
							... 
							
							
							
							(From SF patch #810751 ) 
							
						 
						
							2003-10-20 14:01:56 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Raymond Hettinger 
								
							 
						 
						
							
							
							
							
								
							
							
								f350160d43 
								
							 
						 
						
							
							
								
								Fix spacing markup and other sundries.  
							
							 
							
							
							
						 
						
							2003-09-08 19:01:04 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Fred Drake 
								
							 
						 
						
							
							
							
							
								
							
							
								a26c16c821 
								
							 
						 
						
							
							
								
								fix \NULL with following space and no {} (two instances)  
							
							 
							
							
							
						 
						
							2003-09-07 02:33:37 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Raymond Hettinger 
								
							 
						 
						
							
							
							
							
								
							
							
								f17d65da3a 
								
							 
						 
						
							
							
								
								SF patch#786531 'the the' typo.  Contributed by George Yoshida  
							
							 
							
							
							
						 
						
							2003-08-12 00:01:16 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Fred Drake 
								
							 
						 
						
							
							
							
							
								
							
							
								901a41e757 
								
							 
						 
						
							
							
								
								normalize markup for consistency  
							
							 
							
							
							
						 
						
							2003-07-01 16:17:50 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Barry Warsaw 
								
							 
						 
						
							
							
							
							
								
							
							
								6891cd3aa3 
								
							 
						 
						
							
							
								
								A few minor improvements  
							
							 
							
							
							
						 
						
							2003-06-28 15:22:16 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								6c71091fbe 
								
							 
						 
						
							
							
								
								Rewrote the docs for supporting cyclic garbage collection to reflect  
							
							 
							
							... 
							
							
							
							the new way that once writes types.
Deleted the old section and sample code and added a new section
building on the Noddy example. 
							
						 
						
							2003-06-28 13:29:16 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								18a6be9748 
								
							 
						 
						
							
							
								
								Added tests for sample modules.  
							
							 
							
							
							
						 
						
							2003-06-28 11:54:40 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								f0e38d1cd2 
								
							 
						 
						
							
							
								
								Added s setup module to make it easier to test the sample modules.  
							
							 
							
							
							
						 
						
							2003-06-28 11:54:20 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								7050e929e6 
								
							 
						 
						
							
							
								
								Fixed bug in implementation of tp_init function. It should be an int  
							
							 
							
							... 
							
							
							
							function, not a PyObject *. 
							
						 
						
							2003-06-28 11:54:03 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								4b59f9165d 
								
							 
						 
						
							
							
								
								Changed the assignment of PyType_GenericNew to tp_new slot. Now do  
							
							 
							
							... 
							
							
							
							this in module initialization before calling PyType_Ready.  (Sorry
Tim.) This is necessary to compile on cygwin.  AFAIK, we support
cygwin. If so, then we need to write extentions this way. 
							
						 
						
							2003-06-28 11:53:29 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								db6a569de7 
								
							 
						 
						
							
							
								
								Changed the assignment of PyType_GenericNew to tp_new slot. Now do  
							
							 
							
							... 
							
							
							
							this in module initialization before calling PyType_Ready.  (Sorry
Tim.) This is necessary to compile on cygwin.  AFAIK, we support
cygwin. If so, then we need to write extentions this way.
Fixed bug in implementation of tp_init function. It should be an int
function, not a PyObject *. 
							
						 
						
							2003-06-28 11:53:12 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Raymond Hettinger 
								
							 
						 
						
							
							
							
							
								
							
							
								8fb665a51a 
								
							 
						 
						
							
							
								
								Fix ref counts in initialization code.  
							
							 
							
							
							
						 
						
							2003-05-25 17:59:38 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Raymond Hettinger 
								
							 
						 
						
							
							
							
							
								
							
							
								f9c2eda3c1 
								
							 
						 
						
							
							
								
								Fix missing parethesis.  
							
							 
							
							
							
						 
						
							2003-05-20 05:31:16 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Raymond Hettinger 
								
							 
						 
						
							
							
							
							
								
							
							
								047c54bb24 
								
							 
						 
						
							
							
								
								Missing parenthesis.  
							
							 
							
							
							
						 
						
							2003-05-16 14:36:26 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								1f325562f0 
								
							 
						 
						
							
							
								
								Added some missing PyObject* casts in the deallocators.  
							
							 
							
							... 
							
							
							
							Added some defines for PyMODINIT_FUNC so that the examples work
with Python 2.2.
I think I'm done hacking this documentation. Yippie! :) 
							
						 
						
							2003-05-16 13:53:43 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								a24d73ddb1 
								
							 
						 
						
							
							
								
								Added a missing PyObject* cast to the dealloc examples.  
							
							 
							
							... 
							
							
							
							Added a note that the mechanism for defining new tyoes documented here
only works for Python 2.2 and higher. 
							
						 
						
							2003-05-16 13:51:58 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								aea763bde7 
								
							 
						 
						
							
							
								
								Removed reference to the out-of-date (and not very useful)  
							
							 
							
							... 
							
							
							
							Objects/xxobject.c example.
Updated the discussion of type checking to refer to
PyObject_TypeCheck. 
							
						 
						
							2003-05-16 13:32:59 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								d2eadc6946 
								
							 
						 
						
							
							
								
								Updated simple example. This should have been checked in the other  
							
							 
							
							... 
							
							
							
							day, but I missfired in CVS. 
							
						 
						
							2003-05-12 17:42:56 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								3ff5bb20b7 
								
							 
						 
						
							
							
								
								Fixed small typo Pointed out by Michael Hudson.  
							
							 
							
							
							
						 
						
							2003-05-08 10:35:07 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								83cedcf660 
								
							 
						 
						
							
							
								
								Fixed a typo in an example dealloc routine that calls it's "self"  
							
							 
							
							... 
							
							
							
							argument "obj" rather than "self". 
							
						 
						
							2003-05-08 10:32:10 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Jim Fulton 
								
							 
						 
						
							
							
							
							
								
							
							
								aed0a4a138 
								
							 
						 
						
							
							
								
								Rewrote the basic section of the chapter on defining new types.  
							
							 
							
							... 
							
							
							
							Changed the example to show how to create types the new way:
- Use a class new method rather than a new function.
- Use self->ob_type->tp_free in deallocators
- Use attribute descriptors rather than set/getattr methods.
- Make the type usable as a base type.
I split the example into 3 parts:
1. The minimal new type
2. Adding attributes and methods.
3. Finer control over attributes.
It's much simpler to define builtin types. These updates hopefully
show this.
I also made minor wording changes in two other places.
I still need to update xxobject.c 
							
						 
						
							2003-05-07 19:48:13 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Michael W. Hudson 
								
							 
						 
						
							
							
							
							
								
							
							
								241c2e9692 
								
							 
						 
						
							
							
								
								Remove another lie.  
							
							 
							
							
							
						 
						
							2003-02-06 18:38:11 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Greg Ward 
								
							 
						 
						
							
							
							
							
								
							
							
								d4fee28717 
								
							 
						 
						
							
							
								
								Rewrite awkward/ungrammatical sentence.  
							
							 
							
							... 
							
							
							
							Typo fix. 
							
						 
						
							2003-01-08 03:02:26 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Greg Ward 
								
							 
						 
						
							
							
							
							
								
							
							
								fdf65d9106 
								
							 
						 
						
							
							
								
								Grammatical fix: change possessive "it's" to "its".  
							
							 
							
							
							
						 
						
							2003-01-03 21:09:57 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Greg Ward 
								
							 
						 
						
							
							
							
							
								
							
							
								3ebf56c60f 
								
							 
						 
						
							
							
								
								Two more typo fixes.  
							
							 
							
							
							
						 
						
							2002-12-17 23:27:41 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Greg Ward 
								
							 
						 
						
							
							
							
							
								
							
							
								1d5d8cf61f 
								
							 
						 
						
							
							
								
								Typo fix.  
							
							 
							
							
							
						 
						
							2002-12-17 18:14:21 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Neal Norwitz 
								
							 
						 
						
							
							
							
							
								
							
							
								0f30dbd991 
								
							 
						 
						
							
							
								
								Fix SF # 626275, missing DECREF's in embedding example  
							
							 
							
							... 
							
							
							
							Tested w/valgrind, all paths except the return on PyInt_AsLong() failure
I think I got all of these right.
Backport candidate. 
							
						 
						
							2002-12-17 00:40:38 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Neal Norwitz 
								
							 
						 
						
							
							
							
							
								
							
							
								75bc8ba0d7 
								
							 
						 
						
							
							
								
								Fix SF # 646578, Documentation Typo  
							
							 
							
							
							
						 
						
							2002-12-02 04:42:58 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Neal Norwitz 
								
							 
						 
						
							
							
							
							
								
							
							
								ae6bf4adfa 
								
							 
						 
						
							
							
								
								Remove unused variable  
							
							 
							
							
							
						 
						
							2002-12-02 04:40:21 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Fred Drake 
								
							 
						 
						
							
							
							
							
								
							
							
								cc6cc5ddff 
								
							 
						 
						
							
							
								
								Fix minor markup nits.  
							
							 
							
							
							
						 
						
							2002-11-05 16:52:50 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Greg Ward 
								
							 
						 
						
							
							
							
							
								
							
							
								373198e751 
								
							 
						 
						
							
							
								
								Fix peculiar (and ungrammatical) wording in an example program.  
							
							 
							
							
							
						 
						
							2002-08-22 19:15:35 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Mark Hammond 
								
							 
						 
						
							
							
							
							
								
							
							
								543fb35cca 
								
							 
						 
						
							
							
								
								Replace DL_EXPORT with PyMODINIT_FUNC  
							
							 
							
							
							
						 
						
							2002-07-31 06:17:46 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Mark Hammond 
								
							 
						 
						
							
							
							
							
								
							
							
								8235ea1c3a 
								
							 
						 
						
							
							
								
								Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.  
							
							 
							
							
							
						 
						
							2002-07-19 06:55:41 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Fred Drake 
								
							 
						 
						
							
							
							
							
								
							
							
								50ceb68b4f 
								
							 
						 
						
							
							
								
								Change staticforward and statichere to just use static.  
							
							 
							
							... 
							
							
							
							Removed ^M from some line-ends. 
							
						 
						
							2002-07-17 16:42:48 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Fred Drake 
								
							 
						 
						
							
							
							
							
								
							
							
								a3cd9bbaa3 
								
							 
						 
						
							
							
								
								Remove now-obsolete staticforward/statichere discussion.  
							
							 
							
							
							
						 
						
							2002-07-17 16:40:39 +00:00  
						
						
							 
							
							
							
								 
							 
							
							
								 
							 
							
						 
					 
				
					
						
							
								
								
									 
									Thomas Heller 
								
							 
						 
						
							
							
							
							
								
							
							
								291e9ee341 
								
							 
						 
						
							
							
								
								Fix a typo.  
							
							 
							
							
							
						 
						
							2002-07-04 08:36:53 +00:00