This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[python] Fix review comments from Tromey on convenience functionspatch.


Hi,

Just committed this.
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center


commit 5d73409799981c07fba0c15494f53285bb662437
Author: Thiago Jung Bauermann <bauerman@br.ibm.com>
Date:   Thu Mar 5 15:24:03 2009 -0300

    Fix review comments from Tromey on convenience functions patch.
    
	* python/python-function.c: Update copyright years.
	(fnpy_call): Remove whitespace in empty line.
	(fnpy_init): Move initialization of tp_new and tp_init elements
	of fnpy_object_type from here ...
	(fnpy_object_type): ... to here.

diff --git a/gdb/python/python-function.c b/gdb/python/python-function.c
index 608ac28..4a85a33 100644
--- a/gdb/python/python-function.c
+++ b/gdb/python/python-function.c
@@ -93,7 +93,7 @@ fnpy_call (void *cookie, int argc, struct value **argv)
 
   Py_DECREF (result);
   do_cleanups (cleanup);
-  
+
   return value;
 }
 
@@ -127,10 +127,9 @@ fnpy_init (PyObject *self, PyObject *args, PyObject *kwds)
 void
 gdbpy_initialize_functions (void)
 {
-  fnpy_object_type.tp_new = PyType_GenericNew;
-  fnpy_object_type.tp_init = fnpy_init;
   if (PyType_Ready (&fnpy_object_type) < 0)
     return;
+
   Py_INCREF (&fnpy_object_type);
   PyModule_AddObject (gdb_module, "Function", (PyObject *) &fnpy_object_type);
 }
@@ -167,5 +166,15 @@ static PyTypeObject fnpy_object_type =
   0,				  /* tp_weaklistoffset */
   0,				  /* tp_iter */
   0,				  /* tp_iternext */
-  0				  /* tp_methods */
+  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 */
+  fnpy_init,			  /* tp_init */
+  0,				  /* tp_alloc */
+  PyType_GenericNew		  /* tp_new */
 };



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]