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

dcjim@users.sourceforge.net dcjim@users.sourceforge.net
Sat, 28 Jun 2003 04:54:05 -0700


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

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


Index: noddy3.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/noddy3.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** noddy3.c	25 May 2003 17:59:38 -0000	1.3
--- noddy3.c	28 Jun 2003 11:54:03 -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;
  }