commit:     543c10d424a5965d85133ce8226ac8b8b7fdd6e2
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 10 09:47:10 2026 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Jan 10 09:47:10 2026 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=543c10d4

libq/xarray: drop DEFINE_ARRAY macro

it feels somewhat misleading to just define a pointer to a struct via a
macro, drop it

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 applets.h     | 6 +++---
 libq/xarray.h | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/applets.h b/applets.h
index e8412bf..4434c8f 100644
--- a/applets.h
+++ b/applets.h
@@ -178,9 +178,9 @@ extern set  *features;
 extern set  *ev_use;
 extern char *install_mask;
 extern char *binpkg_format;
-extern DEFINE_ARRAY(overlays);
-extern DEFINE_ARRAY(overlay_names);
-extern DEFINE_ARRAY(overlay_src);
+extern array_t *overlays;
+extern array_t *overlay_names;
+extern array_t *overlay_src;
 extern char *main_overlay;
 extern int twidth;
 extern bool nocolor;

diff --git a/libq/xarray.h b/libq/xarray.h
index 6af0d39..6f5b128 100644
--- a/libq/xarray.h
+++ b/libq/xarray.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2019 Gentoo Foundation
+ * Copyright 2003-2026 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
  *
  * Copyright 2003-2007 Ned Ludd        - <[email protected]>
@@ -33,7 +33,6 @@ typedef struct {
 #define array_init_decl { .eles = NULL, .num = 0, }
 #define array_cnt(arr) (arr)->num
 #define DECLARE_ARRAY(arr) array_t _##arr = array_init_decl, *arr = &_##arr
-#define DEFINE_ARRAY(arr) array_t *arr;
 #define xarraypush_str(arr, ele) xarraypush(arr, ele, strlen(ele) + 1 /*NUL*/)
 #define xarraypush_struct(arr, ele) xarraypush(arr, ele, sizeof(*(ele)))
 

Reply via email to