[Python-checkins] python/dist/src/Doc/ext noddy2.c,1.3,1.4

dcjim@users.sourceforge.net dcjim@users.sourceforge.net
Sat, 28 Jun 2003 04:53:49 -0700


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

Modified Files:
	noddy2.c 
Log Message:
Fixed bug in implementation of tp_init function. It should be an int
function, not a PyObject *.


Index: noddy2.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/noddy2.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** noddy2.c	25 May 2003 17:59:38 -0000	1.3
--- noddy2.c	28 Jun 2003 11:53:47 -0000	1.4
***************
*** 44,48 ****
  }
  
! static PyObject *
  Noddy_init(Noddy *self, PyObject *args, PyObject *kwds)
  {
--- 44,48 ----
  }
  
! static int
  Noddy_init(Noddy *self, PyObject *args, PyObject *kwds)
  {
***************
*** 54,58 ****
                                        &first, &last, 
                                        &self->number))
!         return NULL; 
  
      if (first) {
--- 54,58 ----
                                        &first, &last, 
                                        &self->number))
!         return -1; 
  
      if (first) {
***************
*** 68,73 ****
      }
  
!     Py_INCREF(Py_None);
!     return Py_None;
  }
  
--- 68,72 ----
      }
  
!     return 0;
  }