]> Git Repo - binutils.git/blobdiff - gdb/guile/scm-lazy-string.c
Automatic date update in version.in
[binutils.git] / gdb / guile / scm-lazy-string.c
index 0df1b3a0f81d1916f7f40c54fd5c6a745d0ccd41..d260e09b91decdb2ae9856a7e3a4d63240b1aaf0 100644 (file)
@@ -1,6 +1,6 @@
 /* Scheme interface to lazy strings.
 
-   Copyright (C) 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2010-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -29,7 +29,7 @@
 
 /* The <gdb:lazy-string> smob.  */
 
-typedef struct
+struct lazy_string_smob
 {
   /* This always appears first.  */
   gdb_smob base;
@@ -58,7 +58,7 @@ typedef struct
      This is recorded as an SCM object so that we take advantage of support for
      preserving the type should its owning objfile go away.  */
   SCM type;
-} lazy_string_smob;
+};
 
 static const char lazy_string_smob_name[] = "gdb:lazy-string";
 
@@ -205,7 +205,7 @@ lsscm_elt_type (lazy_string_smob *ls_smob)
     {
     case TYPE_CODE_PTR:
     case TYPE_CODE_ARRAY:
-      return TYPE_TARGET_TYPE (realtype);
+      return realtype->target_type ();
     default:
       /* This is done to preserve existing behaviour.  PR 20769.
         E.g., gdb.parse_and_eval("my_int_variable").lazy_string().type.  */
@@ -324,7 +324,7 @@ lsscm_safe_lazy_string_to_value (SCM string, int arg_pos,
              /* PR 20786: There's no way to specify an array of length zero.
                 Record a length of [0,-1] which is how Ada does it.  Anything
                 we do is broken, but this one possible solution.  */
-             type = lookup_array_range_type (TYPE_TARGET_TYPE (realtype),
+             type = lookup_array_range_type (realtype->target_type (),
                                              0, ls_smob->length - 1);
              value = value_at_lazy (type, ls_smob->address);
            }
This page took 0.023075 seconds and 4 git commands to generate.