public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-tromey-python: * python/python-internal.h (gdb_owned_value_to_value_object):
@ 2008-12-22 17:01 tromey
0 siblings, 0 replies; only message in thread
From: tromey @ 2008-12-22 17:01 UTC (permalink / raw)
To: archer-commits
The branch, archer-tromey-python has been updated
via be2a1323d346dc0acf4d9fb9606163a45946d8f0 (commit)
from 5451b5163eed5fedf74e8372d319d0c24a0f7879 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit be2a1323d346dc0acf4d9fb9606163a45946d8f0
Author: Tom Tromey <tromey@redhat.com>
Date: Mon Dec 22 10:01:46 2008 -0700
* python/python-internal.h (gdb_owned_value_to_value_object):
Remove.
* python/python-value.c (gdb_owned_value_to_value_object):
Remove.
(value_object_type): Add valpy_new.
(gdbpy_initialize_values): Don't set tp_new.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 9 +++++++++
gdb/python/python-internal.h | 1 -
gdb/python/python-value.c | 33 +++++++++++----------------------
3 files changed, 20 insertions(+), 23 deletions(-)
First 500 lines of diff:
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a4254c2..5fb46a1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2008-12-22 Tom Tromey <tromey@redhat.com>
+
+ * python/python-internal.h (gdb_owned_value_to_value_object):
+ Remove.
+ * python/python-value.c (gdb_owned_value_to_value_object):
+ Remove.
+ (value_object_type): Add valpy_new.
+ (gdbpy_initialize_values): Don't set tp_new.
+
2008-12-17 Paul Pluzhnikov <ppluzhnikov@google.com>
* python/lib/gdb/libstdcxx/v6/printers.py: Iterator pretty-printers.
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 7e56784..0c1352c 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -84,7 +84,6 @@ PyObject *symtab_to_symtab_object (struct symtab *symtab);
PyObject *symbol_to_symbol_object (struct symbol *sym);
PyObject *block_to_block_object (struct block *block);
PyObject *value_to_value_object (struct value *v);
-PyObject *gdb_owned_value_to_value_object (struct value *v);
PyObject *type_to_type_object (struct type *);
PyObject *objfile_to_objfile_object (struct objfile *);
diff --git a/gdb/python/python-value.c b/gdb/python/python-value.c
index 2d12de3..e3a6ee1 100644
--- a/gdb/python/python-value.c
+++ b/gdb/python/python-value.c
@@ -738,26 +738,6 @@ valpy_float (PyObject *self)
return PyFloat_FromDouble (d);
}
-/* A value owned by GDB is in the all_values chain, so it will be freed
- automatically when not needed anymore (i.e., before the current command
- completes). */
-PyObject *
-gdb_owned_value_to_value_object (struct value *v)
-{
- value_object *result = PyObject_New (value_object, &value_object_type);
- if (result != NULL)
- {
- result->value = v;
- result->owned_by_gdb = 1;
- /* FIXME: should we do it? What is it? */
- /* I don't think it is needed, since a GDB owned value has a very short
- lifetime. The purpose of the list is explained in the comment above
- its declaration. -- bauermann */
- value_prepend_to_list (&values_in_python, v);
- }
- return (PyObject *) result;
-}
-
/* Returns an object for a value which is released from the all_values chain,
so its lifetime is not bound to the execution of a command. */
PyObject *
@@ -867,7 +847,6 @@ gdbpy_history (PyObject *self, PyObject *args)
void
gdbpy_initialize_values (void)
{
- value_object_type.tp_new = valpy_new;
if (PyType_Ready (&value_object_type) < 0)
return;
@@ -950,7 +929,17 @@ PyTypeObject value_object_type = {
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
- value_object_methods /* tp_methods */
+ value_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 */
+ valpy_new /* tp_new */
};
#endif /* HAVE_PYTHON */
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-22 17:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-22 17:01 [SCM] archer-tromey-python: * python/python-internal.h (gdb_owned_value_to_value_object): tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).