poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] pickles: elf-64.pk: use apush


From: Mohammad-Reza Nabipoor
Subject: [PATCH 1/2] pickles: elf-64.pk: use apush
Date: Sun, 18 Sep 2022 23:59:48 +0430

2022-09-18  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>

        * pickles/elf-64.pk (Elf64_File.get_sections_by_name): Use `apush'.
        (Elf64_File.get_sections_by_type): Likewise.
        (Elf64_File.get_group_signatures): Likewise.
        (Elf64_File.get_section_group): Likewise.
---
 ChangeLog         | 7 +++++++
 pickles/elf-64.pk | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8dcf1846..f04d36fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-09-18  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
+
+       * pickles/elf-64.pk (Elf64_File.get_sections_by_name): Use `apush'.
+       (Elf64_File.get_sections_by_type): Likewise.
+       (Elf64_File.get_group_signatures): Likewise.
+       (Elf64_File.get_section_group): Likewise.
+
 2022-09-18  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
 
        * pickles/riscv.pk: New pickle for RISC-V RV32I instruction set.
diff --git a/pickles/elf-64.pk b/pickles/elf-64.pk
index 6da1a5e2..be74f9ba 100644
--- a/pickles/elf-64.pk
+++ b/pickles/elf-64.pk
@@ -241,7 +241,7 @@ type Elf64_File =
         var sections = Elf64_Shdr[]();
 
         for (s in shdr where get_section_name (s.sh_name) == name)
-          sections += [s];
+          apush (sections, s);
 
         return sections;
       }
@@ -254,7 +254,7 @@ type Elf64_File =
         var sections = Elf64_Shdr[]();
 
         for (s in shdr where s.sh_type == stype)
-          sections += [s];
+          apush (sections, s);
 
         return sections;
       }
@@ -311,7 +311,7 @@ type Elf64_File =
         var signatures = string[]();
 
         for (section in shdr where section.sh_type == SHT_GROUP)
-          signatures += [get_group_signature (section)];
+          apush (signatures, get_group_signature (section));
 
         return signatures;
       }
@@ -334,7 +334,7 @@ type Elf64_File =
                  @ sec'ios : sec.sh_offset + sizeof (Elf_Word));
 
             for (entry in group_entries)
-              section_group += [shdr[entry]];
+              apush (section_group, shdr[entry]);
 
             break;
          }
-- 
2.37.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]