summaryrefslogtreecommitdiff
path: root/prism/util/pm_string_list.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-06-05 13:47:00 -0400
committerKevin Newton <[email protected]>2024-06-05 14:40:03 -0400
commitac70dd07e68384bf5e271dae7e8f08e7a64df1a1 (patch)
treea3ac3a792fdfa2a97d6c91f3b2642803dac23b02 /prism/util/pm_string_list.c
parentad438623e8f4e90b7d6567c6c552be89d080dcca (diff)
[ruby/prism] Remove unused string list struct
https://github.com/ruby/prism/commit/36c6851c85
Diffstat (limited to 'prism/util/pm_string_list.c')
-rw-r--r--prism/util/pm_string_list.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/prism/util/pm_string_list.c b/prism/util/pm_string_list.c
deleted file mode 100644
index f6c2145987..0000000000
--- a/prism/util/pm_string_list.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "prism/util/pm_string_list.h"
-
-/**
- * Append a pm_string_t to the given string list.
- */
-void
-pm_string_list_append(pm_string_list_t *string_list, pm_string_t *string) {
- if (string_list->length + 1 > string_list->capacity) {
- if (string_list->capacity == 0) {
- string_list->capacity = 1;
- } else {
- string_list->capacity *= 2;
- }
-
- string_list->strings = xrealloc(string_list->strings, string_list->capacity * sizeof(pm_string_t));
- if (string_list->strings == NULL) abort();
- }
-
- string_list->strings[string_list->length++] = *string;
-}
-
-/**
- * Free the memory associated with the string list
- */
-void
-pm_string_list_free(pm_string_list_t *string_list) {
- xfree(string_list->strings);
-}