[Python-checkins] python/dist/src/Doc/ext noddy.c,1.6,1.7 noddy2.c,1.2,1.3 noddy3.c,1.2,1.3

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Sun, 25 May 2003 10:59:40 -0700


Update of /cvsroot/python/python/dist/src/Doc/ext
In directory sc8-pr-cvs1:/tmp/cvs-serv4904

Modified Files:
	noddy.c noddy2.c noddy3.c 
Log Message:
Fix ref counts in initialization code.

Index: noddy.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/noddy.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** noddy.c	16 May 2003 13:53:43 -0000	1.6
--- noddy.c	25 May 2003 17:59:37 -0000	1.7
***************
*** 66,69 ****
--- 66,70 ----
                         "Example module that creates an extension type.");
  
+     Py_INCREF(&noddy_NoddyType);
      PyModule_AddObject(m, "Noddy", (PyObject *)&noddy_NoddyType);
  }

Index: noddy2.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/noddy2.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** noddy2.c	16 May 2003 13:53:43 -0000	1.2
--- noddy2.c	25 May 2003 17:59:38 -0000	1.3
***************
*** 185,188 ****
--- 185,189 ----
        return;
  
+     Py_INCREF(&NoddyType);
      PyModule_AddObject(m, "Noddy", (PyObject *)&NoddyType);
  }

Index: noddy3.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/noddy3.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** noddy3.c	16 May 2003 13:53:43 -0000	1.2
--- noddy3.c	25 May 2003 17:59:38 -0000	1.3
***************
*** 238,241 ****
--- 238,242 ----
        return;
  
+     Py_INCREF(&NoddyType);
      PyModule_AddObject(m, "Noddy", (PyObject *)&NoddyType);
  }