[Numpy-svn] r5939 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Wed Oct 8 08:36:07 CDT 2008


Author: cdavid
Date: 2008-10-08 08:35:27 -0500 (Wed, 08 Oct 2008)
New Revision: 5939

Modified:
   trunk/numpy/core/src/arraymethods.c
   trunk/numpy/core/src/arrayobject.c
   trunk/numpy/core/src/multiarraymodule.c
   trunk/numpy/core/src/scalarmathmodule.c.src
   trunk/numpy/core/src/scalartypes.inc.src
   trunk/numpy/core/src/ufuncobject.c
   trunk/numpy/core/src/umathmodule.c.src
Log:
Fix missing initializers warnings.


Modified: trunk/numpy/core/src/arraymethods.c
===================================================================
--- trunk/numpy/core/src/arraymethods.c	2008-10-08 13:34:09 UTC (rev 5938)
+++ trunk/numpy/core/src/arraymethods.c	2008-10-08 13:35:27 UTC (rev 5939)
@@ -2021,7 +2021,7 @@
          METH_VARARGS | METH_KEYWORDS, NULL},
     {"view", (PyCFunction)array_view,
          METH_VARARGS | METH_KEYWORDS, NULL},
-    {NULL, NULL}           /* sentinel */
+    {NULL, NULL, 0, NULL}           /* sentinel */
 };
 
 #undef _ARET

Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c	2008-10-08 13:34:09 UTC (rev 5938)
+++ trunk/numpy/core/src/arrayobject.c	2008-10-08 13:35:27 UTC (rev 5939)
@@ -6880,69 +6880,69 @@
 static PyGetSetDef array_getsetlist[] = {
     {"ndim",
      (getter)array_ndim_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"flags",
      (getter)array_flags_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"shape",
      (getter)array_shape_get,
      (setter)array_shape_set,
-     NULL},
+     NULL, NULL},
     {"strides",
      (getter)array_strides_get,
      (setter)array_strides_set,
-     NULL},
+     NULL, NULL},
     {"data",
      (getter)array_data_get,
      (setter)array_data_set,
-     NULL},
+     NULL, NULL},
     {"itemsize",
      (getter)array_itemsize_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"size",
      (getter)array_size_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"nbytes",
      (getter)array_nbytes_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"base",
      (getter)array_base_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"dtype",
      (getter)array_descr_get,
      (setter)array_descr_set,
-     NULL},
+     NULL, NULL},
     {"real",
      (getter)array_real_get,
      (setter)array_real_set,
-     NULL},
+     NULL, NULL},
     {"imag",
      (getter)array_imag_get,
      (setter)array_imag_set,
-     NULL},
+     NULL, NULL},
     {"flat",
      (getter)array_flat_get,
      (setter)array_flat_set,
-     NULL},
+     NULL, NULL},
     {"ctypes",
      (getter)array_ctypes_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"T",
      (getter)array_transpose_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"__array_interface__",
      (getter)array_interface_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"__array_struct__",
      (getter)array_struct_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"__array_priority__",
      (getter)array_priority_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"__array_finalize__",
      (getter)array_finalize_get,
-     NULL, NULL},
-    {NULL, NULL, NULL, NULL},  /* Sentinel */
+     NULL, NULL, NULL},
+    {NULL, NULL, NULL, NULL, NULL},  /* Sentinel */
 };
 
 /****************** end of attribute get and set routines *******************/
@@ -7017,7 +7017,17 @@
     0,                                          /* tp_mro */
     0,                                          /* tp_cache */
     0,                                          /* tp_subclasses */
-    0                                           /* tp_weaklist */
+    0,                                          /* tp_weaklist */
+    0,   /* tp_del */
+
+#ifdef COUNT_ALLOCS
+	/* these must be last and never explicitly initialized */
+    0, /* tp_allocs */
+    0, /* tp_frees */
+    0, /* tp_maxalloc */
+    0, /* tp_prev */
+    0, /* *tp_next */
+#endif
 };
 
 /* The rest of this code is to build the right kind of array from a python */
@@ -10019,7 +10029,7 @@
     /* to get array */
     {"__array__", (PyCFunction)iter_array, 1, NULL},
     {"copy", (PyCFunction)iter_copy, 1, NULL},
-    {NULL,          NULL}           /* sentinel */
+    {NULL, NULL, 0, NULL}           /* sentinel */
 };
 
 static PyObject *
@@ -10038,7 +10048,7 @@
 static PyMemberDef iter_members[] = {
     {"base", T_OBJECT, offsetof(PyArrayIterObject, ao), RO, NULL},
     {"index", T_INT, offsetof(PyArrayIterObject, index), RO, NULL},
-    {NULL},
+    {NULL, 0, 0, 0, NULL},
 };
 
 static PyObject *
@@ -10062,9 +10072,8 @@
 static PyGetSetDef iter_getsets[] = {
     {"coords",
      (getter)iter_coords_get,
-     NULL,
-     NULL},
-    {NULL, NULL, NULL, NULL},
+     NULL, NULL, NULL},
+    {NULL, NULL, NULL, NULL, NULL},
 };
 
 static PyTypeObject PyArrayIter_Type = {
@@ -10100,6 +10109,30 @@
     iter_methods,                           /* tp_methods */
     iter_members,                   /* tp_members */
     iter_getsets,                           /* 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 */
+    0,   				    /* tp_new */
+    0,   				    /* tp_free */
+    0,   				    /* tp_is_gc */
+    0,   				    /* tp_bases */
+    0,   				    /* tp_mro */
+    0,   				    /* tp_cache */
+    0,   				    /* tp_subclasses */
+    0,   				    /* tp_weaklist */
+    0,   				    /* tp_del */
+#ifdef COUNT_ALLOCS
+	/* these must be last and never explicitly initialized */
+    0, /* tp_allocs */
+    0, /* tp_frees */
+    0, /* tp_maxalloc */
+    0, /* tp_prev */
+    0, /* *tp_next */
+#endif
 
 };
 
@@ -10783,8 +10816,18 @@
     0,                                        /* tp_mro */
     0,                                        /* tp_cache */
     0,                                        /* tp_subclasses */
-    0                                         /* tp_weaklist */
+    0,                                        /* tp_weaklist */
+    0,   				      /* tp_del */
 
+#ifdef COUNT_ALLOCS
+	/* these must be last and never explicitly initialized */
+    0, /* tp_allocs */
+    0, /* tp_frees */
+    0, /* tp_maxalloc */
+    0, /* tp_prev */
+    0, /* *tp_next */
+#endif
+
 };
 
 /** END of Subscript Iterator **/
@@ -11046,24 +11089,24 @@
 static PyGetSetDef arraymultiter_getsetlist[] = {
     {"size",
      (getter)arraymultiter_size_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"index",
      (getter)arraymultiter_index_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"shape",
      (getter)arraymultiter_shape_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"iters",
      (getter)arraymultiter_iters_get,
-     NULL, NULL},
-    {NULL, NULL, NULL, NULL},
+     NULL, NULL, NULL},
+    {NULL, NULL, NULL, NULL, NULL},
 };
 
 static PyMemberDef arraymultiter_members[] = {
     {"numiter", T_INT, offsetof(PyArrayMultiIterObject, numiter),
      RO, NULL},
     {"nd", T_INT, offsetof(PyArrayMultiIterObject, nd), RO, NULL},
-    {NULL},
+    {NULL, 0, 0, 0, NULL},
 };
 
 static PyObject *
@@ -11078,7 +11121,7 @@
 
 static PyMethodDef arraymultiter_methods[] = {
     {"reset", (PyCFunction) arraymultiter_reset, METH_VARARGS, NULL},
-    {NULL, NULL},
+    {NULL, NULL, 0, NULL},
 };
 
 static PyTypeObject PyArrayMultiIter_Type = {
@@ -11128,7 +11171,17 @@
     0,                                        /* tp_mro */
     0,                                        /* tp_cache */
     0,                                        /* tp_subclasses */
-    0                                         /* tp_weaklist */
+    0,                                        /* tp_weaklist */
+    0,   /* tp_del */
+
+#ifdef COUNT_ALLOCS
+	/* these must be last and never explicitly initialized */
+    0, /* tp_allocs */
+    0, /* tp_frees */
+    0, /* tp_maxalloc */
+    0, /* tp_prev */
+    0, /* *tp_next */
+#endif
 };
 
 /*NUMPY_API*/
@@ -11226,7 +11279,7 @@
     {"itemsize", T_INT, offsetof(PyArray_Descr, elsize), RO, NULL},
     {"alignment", T_INT, offsetof(PyArray_Descr, alignment), RO, NULL},
     {"flags", T_UBYTE, offsetof(PyArray_Descr, hasobject), RO, NULL},
-    {NULL},
+    {NULL, 0, 0, 0, NULL},
 };
 
 static PyObject *
@@ -11490,39 +11543,39 @@
 static PyGetSetDef arraydescr_getsets[] = {
     {"subdtype",
      (getter)arraydescr_subdescr_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"descr",
      (getter)arraydescr_protocol_descr_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"str",
      (getter)arraydescr_protocol_typestr_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"name",
      (getter)arraydescr_typename_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"base",
      (getter)arraydescr_base_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"shape",
      (getter)arraydescr_shape_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"isbuiltin",
      (getter)arraydescr_isbuiltin_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"isnative",
      (getter)arraydescr_isnative_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"fields",
      (getter)arraydescr_fields_get,
-     NULL, NULL},
+     NULL, NULL, NULL},
     {"names",
      (getter)arraydescr_names_get,
      (setter)arraydescr_names_set,
-     NULL},
+     NULL, NULL},
     {"hasobject",
      (getter)arraydescr_hasobject_get,
-     NULL, NULL},
-    {NULL, NULL, NULL, NULL},
+     NULL, NULL, NULL},
+    {NULL, NULL, NULL, NULL, NULL},
 };
 
 static PyObject *
@@ -11896,7 +11949,7 @@
      NULL},
     {"newbyteorder", (PyCFunction)arraydescr_newbyteorder, METH_VARARGS,
      NULL},
-    {NULL,          NULL}           /* sentinel */
+    {NULL, NULL, 0, NULL}           /* sentinel */
 };
 
 static PyObject *
@@ -12130,6 +12183,12 @@
     descr_length,
     (binaryfunc)NULL,
     descr_repeat,
+    NULL, NULL,
+    NULL, /* sq_ass_item */
+    NULL, /* ssizessizeobjargproc sq_ass_slice */
+    0, /* sq_contains */
+    0, /* sq_inplace_concat */
+    0, /* sq_inplace_repeat */
 };
 
 static PyMappingMethods descr_as_mapping = {
@@ -12188,7 +12247,17 @@
     0,                                        /* tp_mro */
     0,                                        /* tp_cache */
     0,                                        /* tp_subclasses */
-    0                                         /* tp_weaklist */
+    0,                                        /* tp_weaklist */
+    0,   /* tp_del */
+
+#ifdef COUNT_ALLOCS
+	/* these must be last and never explicitly initialized */
+    0, /* tp_allocs */
+    0, /* tp_frees */
+    0, /* tp_maxalloc */
+    0, /* tp_prev */
+    0, /* *tp_next */
+#endif
 };
 
 
@@ -12350,60 +12419,60 @@
     {"contiguous",
      (getter)arrayflags_contiguous_get,
      NULL,
-     ""},
+     "", NULL},
     {"c_contiguous",
      (getter)arrayflags_contiguous_get,
      NULL,
-     ""},
+     "", NULL},
     {"f_contiguous",
      (getter)arrayflags_fortran_get,
      NULL,
-     ""},
+     "", NULL},
     {"fortran",
      (getter)arrayflags_fortran_get,
      NULL,
-     ""},
+     "", NULL},
     {"updateifcopy",
      (getter)arrayflags_updateifcopy_get,
      (setter)arrayflags_updateifcopy_set,
-     ""},
+     "", NULL},
     {"owndata",
      (getter)arrayflags_owndata_get,
      NULL,
-     ""},
+     "", NULL},
     {"aligned",
      (getter)arrayflags_aligned_get,
      (setter)arrayflags_aligned_set,
-     ""},
+     "", NULL},
     {"writeable",
      (getter)arrayflags_writeable_get,
      (setter)arrayflags_writeable_set,
-     ""},
+     "", NULL},
     {"fnc",
      (getter)arrayflags_fnc_get,
      NULL,
-     ""},
+     "", NULL},
     {"forc",
      (getter)arrayflags_forc_get,
      NULL,
-     ""},
+     "", NULL},
     {"behaved",
      (getter)arrayflags_behaved_get,
      NULL,
-     ""},
+     "", NULL},
     {"carray",
      (getter)arrayflags_carray_get,
      NULL,
-     ""},
+     "", NULL},
     {"farray",
      (getter)arrayflags_farray_get,
      NULL,
-     ""},
+     "", NULL},
     {"num",
      (getter)arrayflags_num_get,
      NULL,
-     ""},
-    {NULL, NULL, NULL, NULL},
+     "", NULL},
+    {NULL, NULL, NULL, NULL, NULL},
 };
 
 static PyObject *
@@ -12618,5 +12687,15 @@
     0,                                        /* tp_mro */
     0,                                        /* tp_cache */
     0,                                        /* tp_subclasses */
-    0                                         /* tp_weaklist */
+    0,                                        /* tp_weaklist */
+    0,   /* tp_del */
+
+#ifdef COUNT_ALLOCS
+	/* these must be last and never explicitly initialized */
+    0, /* tp_allocs */
+    0, /* tp_frees */
+    0, /* tp_maxalloc */
+    0, /* tp_prev */
+    0, /* *tp_next */
+#endif
 };

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2008-10-08 13:34:09 UTC (rev 5938)
+++ trunk/numpy/core/src/multiarraymodule.c	2008-10-08 13:35:27 UTC (rev 5939)
@@ -7531,7 +7531,7 @@
      METH_VARARGS | METH_KEYWORDS, NULL},
     {"test_interrupt", (PyCFunction)test_interrupt,
      METH_VARARGS, NULL},
-    {NULL,          NULL, 0}                /* sentinel */
+    {NULL, NULL, 0, NULL}                /* sentinel */
 };
 
 #include "__multiarray_api.c"

Modified: trunk/numpy/core/src/scalarmathmodule.c.src
===================================================================
--- trunk/numpy/core/src/scalarmathmodule.c.src	2008-10-08 13:34:09 UTC (rev 5938)
+++ trunk/numpy/core/src/scalarmathmodule.c.src	2008-10-08 13:35:27 UTC (rev 5939)
@@ -1268,7 +1268,7 @@
      METH_VARARGS, doc_usepythonmath},
     {"use_scalarmath", (PyCFunction) use_scalarmath,
      METH_VARARGS, doc_usescalarmath},
-    {NULL, NULL, 0}
+    {NULL, NULL, 0, NULL}
 };
 
 PyMODINIT_FUNC initscalarmath(void) {

Modified: trunk/numpy/core/src/scalartypes.inc.src
===================================================================
--- trunk/numpy/core/src/scalartypes.inc.src	2008-10-08 13:34:09 UTC (rev 5938)
+++ trunk/numpy/core/src/scalartypes.inc.src	2008-10-08 13:35:27 UTC (rev 5939)
@@ -24,6 +24,59 @@
     0,                                /*ob_size*/
     "numpy.@name@",                   /*tp_name*/
     sizeof(PyObject),                 /*tp_basicsize*/
+    0,                                  /* tp_itemsize */
+    /* methods */
+    0,   /* tp_dealloc */
+    0,   /* tp_print */
+    0,   /* tp_getattr */
+    0,   /* tp_setattr */
+    0,   /* tp_compare */
+    0,   /* tp_repr */
+    0,   /* tp_as_number */
+    0,   /* tp_as_sequence */
+    0,   /* tp_as_mapping */
+    0,   /* tp_hash */
+    0,   /* tp_call */
+    0,   /* tp_str */
+    0,   /* tp_getattro */
+    0,   /* tp_setattro */
+    0,   /* tp_as_buffer */
+    0,   /* tp_flags */
+    0,   /* 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 */
+    0,   /* tp_new */
+    0,   /* tp_free */
+    0,   /* tp_is_gc */
+    0,   /* tp_bases */
+    0,   /* tp_mro */
+    0,   /* tp_cache */
+    0,   /* tp_subclasses */
+    0,   /* tp_weaklist */
+    0,   /* tp_del */
+
+#ifdef COUNT_ALLOCS
+	/* these must be last and never explicitly initialized */
+    0, /* tp_allocs */
+    0, /* tp_frees */
+    0, /* tp_maxalloc */
+    0, /* tp_prev */
+    0, /* *tp_next */
+#endif
 };
 /**end repeat**/
 
@@ -1019,72 +1072,89 @@
     {"ndim",
         (getter)gentype_ndim_get,
         (setter) 0,
-        "number of array dimensions"},
+        "number of array dimensions",
+        NULL},
     {"flags",
         (getter)gentype_flags_get,
         (setter)0,
-        "integer value of flags"},
+        "integer value of flags",
+        NULL},
     {"shape",
         (getter)gentype_shape_get,
         (setter)0,
-        "tuple of array dimensions"},
+        "tuple of array dimensions",
+        NULL},
     {"strides",
         (getter)gentype_shape_get,
         (setter) 0,
-        "tuple of bytes steps in each dimension"},
+        "tuple of bytes steps in each dimension",
+        NULL},
     {"data",
         (getter)gentype_data_get,
         (setter) 0,
-        "pointer to start of data"},
+        "pointer to start of data",
+        NULL},
     {"itemsize",
         (getter)gentype_itemsize_get,
         (setter)0,
-        "length of one element in bytes"},
+        "length of one element in bytes",
+        NULL},
     {"size",
         (getter)gentype_size_get,
         (setter)0,
-        "number of elements in the gentype"},
+        "number of elements in the gentype",
+        NULL},
     {"nbytes",
         (getter)gentype_itemsize_get,
         (setter)0,
-        "length of item in bytes"},
+        "length of item in bytes",
+        NULL},
     {"base",
         (getter)gentype_base_get,
         (setter)0,
-        "base object"},
+        "base object",
+        NULL},
     {"dtype",
         (getter)gentype_typedescr_get,
         NULL,
-        "get array data-descriptor"},
+        "get array data-descriptor",
+        NULL},
     {"real",
         (getter)gentype_real_get,
         (setter)0,
-        "real part of scalar"},
+        "real part of scalar",
+        NULL},
     {"imag",
         (getter)gentype_imag_get,
         (setter)0,
-        "imaginary part of scalar"},
+        "imaginary part of scalar",
+        NULL},
     {"flat",
         (getter)gentype_flat_get,
         (setter)0,
-        "a 1-d view of scalar"},
+        "a 1-d view of scalar",
+        NULL},
     {"T",
         (getter)gentype_transpose_get,
         (setter)0,
-        "transpose"},
+        "transpose",
+        NULL},
     {"__array_interface__",
         (getter)gentype_interface_get,
         NULL,
-        "Array protocol: Python side"},
+        "Array protocol: Python side",
+        NULL},
     {"__array_struct__",
         (getter)gentype_struct_get,
         NULL,
-        "Array protocol: struct"},
+        "Array protocol: struct",
+        NULL},
     {"__array_priority__",
         (getter)gentype_priority_get,
         NULL,
-        "Array priority."},
-    {NULL, NULL, NULL, NULL}  /* Sentinel */
+        "Array priority.",
+        NULL},
+    {NULL, NULL, NULL, NULL, NULL}  /* Sentinel */
 };
 
 
@@ -1574,7 +1644,7 @@
     {"newbyteorder",
         (PyCFunction)gentype_newbyteorder,
         METH_VARARGS, NULL},
-    {NULL, NULL}           /* sentinel */
+    {NULL, NULL, 0, NULL} /* sentinel */
 };
 
 
@@ -1582,12 +1652,14 @@
     {"flags",
         (getter)voidtype_flags_get,
         (setter)0,
-        "integer value of flags"},
+        "integer value of flags",
+        NULL},
     {"dtype",
         (getter)voidtype_dtypedescr_get,
         (setter)0,
-        "dtype object"},
-    {NULL, NULL}
+        "dtype object",
+        NULL},
+    {NULL, NULL, NULL, NULL, NULL}
 };
 
 static PyMethodDef voidtype_methods[] = {
@@ -1597,7 +1669,7 @@
     {"setfield",
         (PyCFunction)voidtype_setfield,
         METH_VARARGS | METH_KEYWORDS, NULL},
-    {NULL, NULL}
+    {NULL, NULL, 0, NULL}
 };
 
 /************* As_mapping functions for void array scalar ************/
@@ -1757,15 +1829,19 @@
     0,                                          /*sq_repeat*/
     (ssizeargfunc)voidtype_item,                /*sq_item*/
     0,                                          /*sq_slice*/
-    (ssizeobjargproc)voidtype_ass_item          /*sq_ass_item*/
+    (ssizeobjargproc)voidtype_ass_item,         /*sq_ass_item*/
 #else
         (inquiry)voidtype_length,               /*sq_length*/
     0,                                          /*sq_concat*/
     0,                                          /*sq_repeat*/
     (intargfunc)voidtype_item,                  /*sq_item*/
     0,                                          /*sq_slice*/
-    (intobjargproc)voidtype_ass_item            /*sq_ass_item*/
+    (intobjargproc)voidtype_ass_item,           /*sq_ass_item*/
 #endif
+    0,                                          /* ssq_ass_slice */
+    0,                                          /* sq_contains */
+    0,                                          /* sq_inplace_concat */
+    0,                                          /* sq_inplace_repeat */
 };
 
 
@@ -1844,6 +1920,59 @@
     0,                          /*ob_size*/
     "numpy.generic",            /*tp_name*/
     sizeof(PyObject),           /*tp_basicsize*/
+    0,   /* tp_itemsize */
+    /* methods */
+    0,   /* tp_dealloc */
+    0,   /* tp_print */
+    0,   /* tp_getattr */
+    0,   /* tp_setattr */
+    0,   /* tp_compare */
+    0,   /* tp_repr */
+    0,   /* tp_as_number */
+    0,   /* tp_as_sequence */
+    0,   /* tp_as_mapping */
+    0,   /* tp_hash */
+    0,   /* tp_call */
+    0,   /* tp_str */
+    0,   /* tp_getattro */
+    0,   /* tp_setattro */
+    0,   /* tp_as_buffer */
+    0,   /* tp_flags */
+    0,   /* 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 */
+    0,   /* tp_new */
+    0,   /* tp_free */
+    0,   /* tp_is_gc */
+    0,   /* tp_bases */
+    0,   /* tp_mro */
+    0,   /* tp_cache */
+    0,   /* tp_subclasses */
+    0,   /* tp_weaklist */
+    0,   /* tp_del */
+
+#ifdef COUNT_ALLOCS
+	/* these must be last and never explicitly initialized */
+    0, /* tp_allocs */
+    0, /* tp_frees */
+    0, /* tp_maxalloc */
+    0, /* tp_prev */
+    0, /* *tp_next */
+#endif
 };
 
 static void
@@ -2097,6 +2226,32 @@
     (binaryfunc)bool_arrtype_and,           /* nb_and */
     (binaryfunc)bool_arrtype_xor,           /* nb_xor */
     (binaryfunc)bool_arrtype_or,            /* nb_or */
+    0,	/* nb_coerce */
+    0,  /* nb_int */
+    0,  /* nb_long */
+    0,  /* nb_float */
+    0,  /* nb_oct */
+    0,  /* nb_hex */
+    /* Added in release 2.0 */
+    0, 	/* nb_inplace_add */
+    0,	/* nb_inplace_subtract */
+    0,	/* nb_inplace_multiply */
+    0,	/* nb_inplace_divide */
+    0,	/* nb_inplace_remainder */
+    0,	/* nb_inplace_power */
+    0,	/* nb_inplace_lshift */
+    0,	/* nb_inplace_rshift */
+    0,	/* nb_inplace_and */
+    0,	/* nb_inplace_xor */
+    0,	/* nb_inplace_or */
+    /* Added in release 2.2 */
+    /* The following require the Py_TPFLAGS_HAVE_CLASS flag */
+    0, 	/* nb_floor_divide */
+    0, 	/* nb_true_divide */
+    0, 	/* nb_inplace_floor_divide */
+    0, 	/* nb_inplace_true_divide */
+    /* Added in release 2.5 */
+    0, 	/* nb_index */
 };
 
 static PyObject *
@@ -2494,6 +2649,40 @@
     (setattrofunc)object_arrtype_setattro,    /* tp_setattro */
     &object_arrtype_as_buffer,                /* tp_as_buffer */
     0,                                        /* tp_flags */
+    0,   				      /* 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 */
+    0,   				      /* tp_new */
+    0,   				      /* tp_free */
+    0,   				      /* tp_is_gc */
+    0,   				      /* tp_bases */
+    0,   				      /* tp_mro */
+    0,   				      /* tp_cache */
+    0,   				      /* tp_subclasses */
+    0,   				      /* tp_weaklist */
+    0,   				      /* tp_del */
+#ifdef COUNT_ALLOCS
+    /* these must be last and never explicitly initialized */
+    0, 					      /* tp_allocs */
+    0, 					      /* tp_frees */
+    0, 					      /* tp_maxalloc */
+    0, 					      /* tp_prev */
+    0, 					      /* *tp_next */
+#endif
 };
 
 
@@ -2554,6 +2743,57 @@
     0,                                        /*ob_size*/
     "numpy.@name@@ex@",                       /*tp_name*/
     sizeof(Py@NAME@ScalarObject),             /*tp_basicsize*/
+    0,                                        /* tp_itemsize */
+    0,       				      /* tp_dealloc */
+    0,                                        /* tp_print */
+    0,                                        /* tp_getattr */
+    0,                                        /* tp_setattr */
+    0,                                        /* tp_compare */
+    0,                                        /* tp_repr */
+    0,                                        /* tp_as_number */
+    0,              			      /* tp_as_sequence */
+    0,               			      /* tp_as_mapping */
+    0,                                        /* tp_hash */
+    0,         				      /* tp_call */
+    0,                                        /* tp_str */
+    0,					      /* tp_getattro */
+    0,					      /* tp_setattro */
+    0,					      /* tp_as_buffer */
+    0,                                        /* tp_flags */
+    0,   				      /* 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 */
+    0,   				      /* tp_new */
+    0,   				      /* tp_free */
+    0,   				      /* tp_is_gc */
+    0,   				      /* tp_bases */
+    0,   				      /* tp_mro */
+    0,   				      /* tp_cache */
+    0,   				      /* tp_subclasses */
+    0,   				      /* tp_weaklist */
+    0,   				      /* tp_del */
+#ifdef COUNT_ALLOCS
+    /* these must be last and never explicitly initialized */
+    0, 					      /* tp_allocs */
+    0, 					      /* tp_frees */
+    0, 					      /* tp_maxalloc */
+    0, 					      /* tp_prev */
+    0, 					      /* *tp_next */
+#endif
 };
 /**end repeat**/
 
@@ -2584,6 +2824,57 @@
     0,                                          /*ob_size*/
     "numpy.@name@" _THIS_SIZE,                  /*tp_name*/
     sizeof(Py@NAME@ScalarObject),               /*tp_basicsize*/
+    0,                                        /* tp_itemsize */
+    0,       				      /* tp_dealloc */
+    0,                                        /* tp_print */
+    0,                                        /* tp_getattr */
+    0,                                        /* tp_setattr */
+    0,                                        /* tp_compare */
+    0,                                        /* tp_repr */
+    0,                                        /* tp_as_number */
+    0,              			      /* tp_as_sequence */
+    0,               			      /* tp_as_mapping */
+    0,                                        /* tp_hash */
+    0,         				      /* tp_call */
+    0,                                        /* tp_str */
+    0,					      /* tp_getattro */
+    0,					      /* tp_setattro */
+    0,					      /* tp_as_buffer */
+    0,                                        /* tp_flags */
+    0,   				      /* 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 */
+    0,   				      /* tp_new */
+    0,   				      /* tp_free */
+    0,   				      /* tp_is_gc */
+    0,   				      /* tp_bases */
+    0,   				      /* tp_mro */
+    0,   				      /* tp_cache */
+    0,   				      /* tp_subclasses */
+    0,   				      /* tp_weaklist */
+    0,   				      /* tp_del */
+#ifdef COUNT_ALLOCS
+    /* these must be last and never explicitly initialized */
+    0, 					      /* tp_allocs */
+    0, 					      /* tp_frees */
+    0, 					      /* tp_maxalloc */
+    0, 					      /* tp_prev */
+    0, 					      /* *tp_next */
+#endif
 };
 
 #undef _THIS_SIZE
@@ -2647,6 +2938,39 @@
     0,                                              /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT,                             /*tp_flags*/
     "Composed of two " _THIS_SIZE2 " bit floats",   /* 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 */
+    0,   				      /* tp_new */
+    0,   				      /* tp_free */
+    0,   				      /* tp_is_gc */
+    0,   				      /* tp_bases */
+    0,   				      /* tp_mro */
+    0,   				      /* tp_cache */
+    0,   				      /* tp_subclasses */
+    0,   				      /* tp_weaklist */
+    0,   				      /* tp_del */
+#ifdef COUNT_ALLOCS
+    /* these must be last and never explicitly initialized */
+    0, 					      /* tp_allocs */
+    0, 					      /* tp_frees */
+    0, 					      /* tp_maxalloc */
+    0, 					      /* tp_prev */
+    0, 					      /* *tp_next */
+#endif
 };
 #undef _THIS_SIZE1
 #undef _THIS_SIZE2

Modified: trunk/numpy/core/src/ufuncobject.c
===================================================================
--- trunk/numpy/core/src/ufuncobject.c	2008-10-08 13:34:09 UTC (rev 5938)
+++ trunk/numpy/core/src/ufuncobject.c	2008-10-08 13:35:27 UTC (rev 5939)
@@ -4034,13 +4034,13 @@
 
 
 static struct PyMethodDef ufunc_methods[] = {
-    {"reduce",  (PyCFunction)ufunc_reduce, METH_VARARGS | METH_KEYWORDS },
+    {"reduce",  (PyCFunction)ufunc_reduce, METH_VARARGS | METH_KEYWORDS, NULL },
     {"accumulate",  (PyCFunction)ufunc_accumulate,
-     METH_VARARGS | METH_KEYWORDS },
+     METH_VARARGS | METH_KEYWORDS, NULL },
     {"reduceat",  (PyCFunction)ufunc_reduceat,
-     METH_VARARGS | METH_KEYWORDS },
-    {"outer", (PyCFunction)ufunc_outer, METH_VARARGS | METH_KEYWORDS },
-    {NULL,          NULL}           /* sentinel */
+     METH_VARARGS | METH_KEYWORDS, NULL },
+    {"outer", (PyCFunction)ufunc_outer, METH_VARARGS | METH_KEYWORDS, NULL},
+    {NULL, NULL, 0, NULL}           /* sentinel */
 };
 
 
@@ -4193,15 +4193,15 @@
 /* static char *Ufunctype__doc__ = NULL; */
 
 static PyGetSetDef ufunc_getset[] = {
-    {"__doc__",  (getter)ufunc_get_doc,      NULL, "documentation string"},
-    {"nin",      (getter)ufunc_get_nin,      NULL, "number of inputs"},
-    {"nout",     (getter)ufunc_get_nout,     NULL, "number of outputs"},
-    {"nargs",    (getter)ufunc_get_nargs,    NULL, "number of arguments"},
-    {"ntypes",   (getter)ufunc_get_ntypes,   NULL, "number of types"},
-    {"types",    (getter)ufunc_get_types,    NULL, "return a list with types grouped input->output"},
-    {"__name__", (getter)ufunc_get_name,     NULL, "function name"},
-    {"identity", (getter)ufunc_get_identity, NULL, "identity value"},
-    {NULL, NULL, NULL, NULL},  /* Sentinel */
+    {"__doc__",  (getter)ufunc_get_doc,      NULL, "documentation string", NULL},
+    {"nin",      (getter)ufunc_get_nin,      NULL, "number of inputs", NULL},
+    {"nout",     (getter)ufunc_get_nout,     NULL, "number of outputs", NULL},
+    {"nargs",    (getter)ufunc_get_nargs,    NULL, "number of arguments", NULL},
+    {"ntypes",   (getter)ufunc_get_ntypes,   NULL, "number of types", NULL},
+    {"types",    (getter)ufunc_get_types,    NULL, "return a list with types grouped input->output", NULL},
+    {"__name__", (getter)ufunc_get_name,     NULL, "function name", NULL},
+    {"identity", (getter)ufunc_get_identity, NULL, "identity value", NULL},
+    {NULL, NULL, NULL, NULL, NULL},  /* Sentinel */
 };
 
 static PyTypeObject PyUFunc_Type = {
@@ -4237,6 +4237,31 @@
     ufunc_methods,                 /* tp_methods */
     0,                             /* tp_members */
     ufunc_getset,                  /* 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 */
+    0,   /* tp_new */
+    0,   /* tp_free */
+    0,   /* tp_is_gc */
+    0,   /* tp_bases */
+    0,   /* tp_mro */
+    0,   /* tp_cache */
+    0,   /* tp_subclasses */
+    0,   /* tp_weaklist */
+    0,   /* tp_del */
+
+#ifdef COUNT_ALLOCS
+	/* these must be last and never explicitly initialized */
+    0, /* tp_allocs */
+    0, /* tp_frees */
+    0, /* tp_maxalloc */
+    0, /* tp_prev */
+    0, /* *tp_next */
+#endif
 };
 
 /* End of code for ufunc objects */

Modified: trunk/numpy/core/src/umathmodule.c.src
===================================================================
--- trunk/numpy/core/src/umathmodule.c.src	2008-10-08 13:34:09 UTC (rev 5938)
+++ trunk/numpy/core/src/umathmodule.c.src	2008-10-08 13:35:27 UTC (rev 5939)
@@ -1586,7 +1586,7 @@
      METH_VARARGS, NULL},
     {"geterrobj", (PyCFunction) ufunc_geterr,
      METH_VARARGS, NULL},
-    {NULL,          NULL, 0}                /* sentinel */
+    {NULL, NULL, 0, NULL}                /* sentinel */
 };
 
 PyMODINIT_FUNC initumath(void) {



More information about the Numpy-svn mailing list