Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: gdb/python/py-lazy-string.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/python/py-infthread.c ('k') | gdb/python/py-linetable.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/python/py-lazy-string.c
diff --git a/gdb/python/py-lazy-string.c b/gdb/python/py-lazy-string.c
index 3c908296f2811928d5abad4409b678c74e1f2084..ea193a97f6e67433ecc02f559b03341d06ca061f 100644
--- a/gdb/python/py-lazy-string.c
+++ b/gdb/python/py-lazy-string.c
@@ -1,6 +1,6 @@
/* Python interface to lazy strings.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -47,7 +47,8 @@ typedef struct {
struct type *type;
} lazy_string_object;
-static PyTypeObject lazy_string_object_type;
+static PyTypeObject lazy_string_object_type
+ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("lazy_string_object");
static PyObject *
stpy_get_address (PyObject *self, void *closure)
@@ -159,13 +160,14 @@ gdbpy_create_lazy_string_object (CORE_ADDR address, long length,
return (PyObject *) str_obj;
}
-void
+int
gdbpy_initialize_lazy_string (void)
{
if (PyType_Ready (&lazy_string_object_type) < 0)
- return;
+ return -1;
Py_INCREF (&lazy_string_object_type);
+ return 0;
}
/* Determine whether the printer object pointed to by OBJ is a
@@ -216,8 +218,7 @@ static PyGetSetDef lazy_string_object_getset[] = {
};
static PyTypeObject lazy_string_object_type = {
- PyObject_HEAD_INIT (NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT (NULL, 0)
"gdb.LazyString", /*tp_name*/
sizeof (lazy_string_object), /*tp_basicsize*/
0, /*tp_itemsize*/
« no previous file with comments | « gdb/python/py-infthread.c ('k') | gdb/python/py-linetable.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698