Fix some indentation in linespec.c
[deliverable/binutils-gdb.git] / gdb / python / py-arch.c
index 8d0ec3330cc332769b78d95f46d3aec2ff74a9f0..a1fdbd61445d28329100fb06ef0ef02b2ab460de 100644 (file)
@@ -1,6 +1,6 @@
 /* Python interface to architecture
 
-   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+   Copyright (C) 2013-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -116,7 +116,7 @@ archpy_name (PyObject *self, PyObject *args)
 static PyObject *
 archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
 {
-  static char *keywords[] = { "start_pc", "end_pc", "count", NULL };
+  static const char *keywords[] = { "start_pc", "end_pc", "count", NULL };
   CORE_ADDR start, end = 0;
   CORE_ADDR pc;
   gdb_py_ulongest start_temp;
@@ -126,8 +126,9 @@ archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
 
   ARCHPY_REQUIRE_VALID (self, gdbarch);
 
-  if (!PyArg_ParseTupleAndKeywords (args, kw, GDB_PY_LLU_ARG "|OO", keywords,
-                                    &start_temp, &end_obj, &count_obj))
+  if (!gdb_PyArg_ParseTupleAndKeywords (args, kw, GDB_PY_LLU_ARG "|OO",
+                                       keywords, &start_temp, &end_obj,
+                                       &count_obj))
     return NULL;
 
   start = start_temp;
@@ -178,7 +179,7 @@ archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
         }
     }
 
-  gdbpy_ref result_list (PyList_New (0));
+  gdbpy_ref<> result_list (PyList_New (0));
   if (result_list == NULL)
     return NULL;
 
@@ -193,7 +194,7 @@ archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
        || (end_obj == NULL && count_obj == NULL && pc == start);)
     {
       int insn_len = 0;
-      gdbpy_ref insn_dict (PyDict_New ());
+      gdbpy_ref<> insn_dict (PyDict_New ());
 
       if (insn_dict == NULL)
        return NULL;
This page took 0.024445 seconds and 4 git commands to generate.