This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
[python] Move initialization of tp_new to frame_object_type.
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: archer ml <archer at sourceware dot org>
- Date: Tue, 10 Mar 2009 13:16:44 -0300
- Subject: [python] Move initialization of tp_new to frame_object_type.
Hi,
This fixes some nits in python-frame.c. Committed.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
commit cc5083e2df32606306eb0e579df54abda1be71a5
Author: Thiago Jung Bauermann <bauerman@br.ibm.com>
Date: Tue Mar 10 12:22:22 2009 -0300
Move initialization of tp_new to frame_object_type.
Also, remove whitespace at end of line.
* python/python-frame.c (gdbpy_initialize_frames): Move
initialization of tp_new field from here ...
(frame_object_type): ... to here.
(frapy_str): Remove whitespace at end of line.
diff --git a/gdb/python/python-frame.c b/gdb/python/python-frame.c
index c257ac3..dc3f45e 100644
--- a/gdb/python/python-frame.c
+++ b/gdb/python/python-frame.c
@@ -83,7 +83,7 @@ frapy_str (PyObject *self)
long len;
PyObject *result;
struct ui_file *strfile;
-
+
strfile = mem_fileopen ();
fprint_frame_id (strfile, ((frame_object *) self)->frame_id);
s = ui_file_xstrdup (strfile, &len);
@@ -583,7 +583,6 @@ gdbpy_frame_stop_reason_string (PyObject *self, PyObject *args)
void
gdbpy_initialize_frames (void)
{
- frame_object_type.tp_new = PyType_GenericNew;
if (PyType_Ready (&frame_object_type) < 0)
return;
@@ -682,5 +681,15 @@ static PyTypeObject frame_object_type = {
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
- frame_object_methods /* tp_methods */
+ frame_object_methods, /* 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 */
};