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

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
2002年7月17日 09:42:50 -0700


Update of /cvsroot/python/python/dist/src/Doc/ext
In directory usw-pr-cvs1:/tmp/cvs-serv21911
Modified Files:
	noddy.c 
Log Message:
Change staticforward and statichere to just use static.
Removed ^M from some line-ends.
Index: noddy.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/noddy.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** noddy.c	12 Apr 2002 16:17:06 -0000	1.2
--- noddy.c	17 Jul 2002 16:42:48 -0000	1.3
***************
*** 1,9 ****
 #include <Python.h>
 
! staticforward PyTypeObject noddy_NoddyType;
 
 typedef struct {
 PyObject_HEAD
! /* Type-specific fields go here. */
 } noddy_NoddyObject;
 
--- 1,9 ----
 #include <Python.h>
 
! static PyTypeObject noddy_NoddyType;
 
 typedef struct {
 PyObject_HEAD
! /* Type-specific fields go here. */
 } noddy_NoddyObject;
 
***************
*** 15,20 ****
 noddy = PyObject_New(noddy_NoddyObject, &noddy_NoddyType);
 
! /* Initialize type-specific fields here. */
! 
 return (PyObject*)noddy;
 }
--- 15,20 ----
 noddy = PyObject_New(noddy_NoddyObject, &noddy_NoddyType);
 
! /* Initialize type-specific fields here. */
! 
 return (PyObject*)noddy;
 }
***************
*** 23,34 ****
 noddy_noddy_dealloc(PyObject* self)
 {
! /* Free any external resources here;
! * if the instance owns references to any Python
! * objects, call Py_DECREF() on them here.
! */
 PyObject_Del(self);
 }
 
! statichere PyTypeObject noddy_NoddyType = {
 PyObject_HEAD_INIT(NULL)
 0,
--- 23,34 ----
 noddy_noddy_dealloc(PyObject* self)
 {
! /* Free any external resources here;
! * if the instance owns references to any Python
! * objects, call Py_DECREF() on them here.
! */
 PyObject_Del(self);
 }
 
! static PyTypeObject noddy_NoddyType = {
 PyObject_HEAD_INIT(NULL)
 0,
***************
*** 49,56 ****
 
 static PyMethodDef noddy_methods[] = {
! {"new_noddy", noddy_new_noddy, METH_NOARGS,
 "Create a new Noddy object."},
! 
! {NULL} /* Sentinel */
 };
 
--- 49,56 ----
 
 static PyMethodDef noddy_methods[] = {
! {"new_noddy", noddy_new_noddy, METH_NOARGS,
 "Create a new Noddy object."},
! 
! {NULL} /* Sentinel */
 };
 
***************
*** 59,66 ****
 {
 noddy_NoddyType.ob_type = &PyType_Type;
! if (PyType_Ready(&noddy_NoddyType))
! return;
 
! Py_InitModule3("noddy", noddy_methods
! "Example module that creates an extension type.");
 }
--- 59,66 ----
 {
 noddy_NoddyType.ob_type = &PyType_Type;
! if (PyType_Ready(&noddy_NoddyType))
! return;
 
! Py_InitModule3("noddy", noddy_methods
! "Example module that creates an extension type.");
 }

AltStyle によって変換されたページ (->オリジナル) /