]> Git Repo - binutils.git/blobdiff - gdb/python/py-function.c
Change get_objfile_arch to a method on objfile
[binutils.git] / gdb / python / py-function.c
index dbd5649bbb527696348a6b7691d6985ee54d85f5..f3b889452f9d4b4f4649410c4aaf24b5c3ba2be5 100644 (file)
@@ -1,6 +1,6 @@
 /* Convenience functions implemented in Python.
 
-   Copyright (C) 2008-2019 Free Software Foundation, Inc.
+   Copyright (C) 2008-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,7 +27,6 @@
 #include "completer.h"
 #include "expression.h"
 #include "language.h"
-#include "py-ref.h"
 
 extern PyTypeObject fnpy_object_type
     CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("PyObject");
@@ -128,8 +127,8 @@ fnpy_init (PyObject *self, PyObject *args, PyObject *kwds)
   if (! docstring)
     docstring.reset (xstrdup (_("This function is not documented.")));
 
-  add_internal_function (name, docstring.release (), fnpy_call,
-                        self_ref.release ());
+  add_internal_function (make_unique_xstrdup (name), std::move (docstring),
+                        fnpy_call, self_ref.release ());
   return 0;
 }
 
This page took 0.031031 seconds and 4 git commands to generate.