This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

FYI: make gdb.Value subclass-able


I am checking this in.

We discussed this on the gdb list a while back.  There is no reason to
prevent subclassing of gdb.Value.

Built & regtested on x86-64 (compile farm).

Tom

2010-12-16  Joel BorggrÃn-Franck  <joel.borggren.franck@gmail.com>

	* python/py-value.c (value_object_type) <tp_flags>: Add
	Py_TPFLAGS_BASETYPE.

Index: python/py-value.c
===================================================================
RCS file: /cvs/src/src/gdb/python/py-value.c,v
retrieving revision 1.17
diff -u -r1.17 py-value.c
--- python/py-value.c	13 Oct 2010 13:24:39 -0000	1.17
+++ python/py-value.c	16 Dec 2010 14:51:09 -0000
@@ -1320,7 +1320,7 @@
   0,				  /*tp_getattro*/
   0,				  /*tp_setattro*/
   0,				  /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES,	/*tp_flags*/
+  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | Py_TPFLAGS_BASETYPE, /*tp_flags*/
   "GDB value object",		  /* tp_doc */
   0,				  /* tp_traverse */
   0,				  /* tp_clear */


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