[Python-checkins] python/dist/src/Doc/ext noddy.c,1.7,1.8

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


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

Modified Files:
	noddy.c 
Log Message:
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.


Index: noddy.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/noddy.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** noddy.c	25 May 2003 17:59:37 -0000	1.7
--- noddy.c	28 Jun 2003 11:53:29 -0000	1.8
***************
*** 29,49 ****
      Py_TPFLAGS_DEFAULT,        /*tp_flags*/
      "Noddy objects",           /* tp_doc */
-     0,		               /* tp_traverse */
-     0,		               /* tp_clear */
-     0,		               /* tp_richcompare */
-     0,		               /* tp_weaklistoffset */
-     0,		               /* tp_iter */
-     0,		               /* tp_iternext */
-     0,		               /* tp_methods */
-     0,                         /* tp_members */
-     0,                         /* tp_getset */
-     0,                         /* tp_base */
-     0,                         /* tp_dict */
-     0,                         /* tp_descr_get */
-     0,                         /* tp_descr_set */
-     0,                         /* tp_dictoffset */
-     0,                         /* tp_init */
-     0,                         /* tp_alloc */
-     PyType_GenericNew,         /* tp_new */
  };
  
--- 29,32 ----
***************
*** 60,63 ****
--- 43,47 ----
      PyObject* m;
  
+     noddy_NoddyType.tp_new = PyType_GenericNew;
      if (PyType_Ready(&noddy_NoddyType) < 0)
          return;