* python/py-breakpoint.c (gdbpy_initialize_breakpoints): Move the
authorEli Zaretskii <eliz@gnu.org>
Fri, 5 Aug 2011 14:24:10 +0000 (14:24 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 5 Aug 2011 14:24:10 +0000 (14:24 +0000)
 initialization of the tp_new member to the corresponding
 gdbpy_initialize_* function.
 * python/py-cmd.c (gdbpy_initialize_commands): Likewise.
 * python/py-frame.c (gdbpy_initialize_frames): Likewise.
 * python/py-function.c (gdbpy_initialize_functions): Likewise.
 * python/py-inferior.c (gdbpy_initialize_inferior): Likewise.
 * python/py-param.c (gdbpy_initialize_parameters): Likewise.

gdb/ChangeLog
gdb/python/py-breakpoint.c
gdb/python/py-cmd.c
gdb/python/py-frame.c
gdb/python/py-function.c
gdb/python/py-inferior.c
gdb/python/py-param.c

index 893a0b43ffb6fb57c7f6e0ce65e6465a0cda546f..a911a3b30fd7a7e7123f7c69b3f0d67cf559597f 100644 (file)
@@ -1,3 +1,14 @@
+2011-08-05  Eli Zaretskii  <eliz@gnu.org>
+
+       * python/py-breakpoint.c (gdbpy_initialize_breakpoints): Move the
+       initialization of the tp_new member to the corresponding
+       gdbpy_initialize_* function.
+       * python/py-cmd.c (gdbpy_initialize_commands): Likewise.
+       * python/py-frame.c (gdbpy_initialize_frames): Likewise.
+       * python/py-function.c (gdbpy_initialize_functions): Likewise.
+       * python/py-inferior.c (gdbpy_initialize_inferior): Likewise.
+       * python/py-param.c (gdbpy_initialize_parameters): Likewise.
+
 2011-08-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
index 126957cf5bd65dbd0536318c3f168df72acebd2a..3dc0fcacbeb1415f3cddaf9af55ea0f88e5f34a3 100644 (file)
@@ -862,6 +862,7 @@ gdbpy_initialize_breakpoints (void)
 {
   int i;
 
+  breakpoint_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&breakpoint_object_type) < 0)
     return;
 
@@ -1016,5 +1017,4 @@ static PyTypeObject breakpoint_object_type =
   0,                             /* tp_dictoffset */
   bppy_init,                     /* tp_init */
   0,                             /* tp_alloc */
-  PyType_GenericNew              /* tp_new */
 };
index 20933fded107e097aa2c73d9e4d9b63826cd0ade..9ff8eaaddf98a8b5b2b751fdb377aec89a962138 100644 (file)
@@ -559,6 +559,7 @@ gdbpy_initialize_commands (void)
 {
   int i;
 
+  cmdpy_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&cmdpy_object_type) < 0)
     return;
 
@@ -646,7 +647,6 @@ static PyTypeObject cmdpy_object_type =
   0,                             /* tp_dictoffset */
   cmdpy_init,                    /* tp_init */
   0,                             /* tp_alloc */
-  PyType_GenericNew              /* tp_new */
 };
 
 \f
index d7128a9dca5cb153df1b7b60ffb967d8d53930e2..7efd13fef3842a980a34e9be00b12bccb151a530 100644 (file)
@@ -593,6 +593,7 @@ frapy_richcompare (PyObject *self, PyObject *other, int op)
 void
 gdbpy_initialize_frames (void)
 {
+  frame_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&frame_object_type) < 0)
     return;
 
@@ -702,5 +703,4 @@ static PyTypeObject frame_object_type = {
   0,                             /* tp_dictoffset */
   0,                             /* tp_init */
   0,                             /* tp_alloc */
-  PyType_GenericNew              /* tp_new */
 };
index 5cdf190306765e6055318fe5ea0cf1820de610d0..dc78b29f216a445c3dd5b2f4cba674c9f8fdbe23 100644 (file)
@@ -182,6 +182,7 @@ fnpy_init (PyObject *self, PyObject *args, PyObject *kwds)
 void
 gdbpy_initialize_functions (void)
 {
+  fnpy_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&fnpy_object_type) < 0)
     return;
 
@@ -231,5 +232,4 @@ static PyTypeObject fnpy_object_type =
   0,                             /* tp_dictoffset */
   fnpy_init,                     /* tp_init */
   0,                             /* tp_alloc */
-  PyType_GenericNew              /* tp_new */
 };
index ab9ee8ed8a6098266b6c52a4335ba34f8c703943..6add6815eb58f99cd429d3589c8f3e3606533675 100644 (file)
@@ -702,6 +702,7 @@ gdbpy_initialize_inferior (void)
   observer_attach_target_resumed (python_on_resume);
   observer_attach_inferior_exit (python_inferior_exit);
 
+  membuf_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&membuf_object_type) < 0)
     return;
 
@@ -839,5 +840,4 @@ static PyTypeObject membuf_object_type = {
   0,                             /* tp_dictoffset */
   0,                             /* tp_init */
   0,                             /* tp_alloc */
-  PyType_GenericNew              /* tp_new */
 };
index 5c726d67904fe52e91d909dfad5983f507d98ff8..747d85b3ea3c398eca9fbec41c7850e726cfecd9 100644 (file)
@@ -749,6 +749,7 @@ gdbpy_initialize_parameters (void)
 {
   int i;
 
+  parmpy_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&parmpy_object_type) < 0)
     return;
 
@@ -814,5 +815,4 @@ static PyTypeObject parmpy_object_type =
   0,                             /* tp_dictoffset */
   parmpy_init,                   /* tp_init */
   0,                             /* tp_alloc */
-  PyType_GenericNew              /* tp_new */
 };