[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH acl] libmisc: rename internal obj APIs with __acl_ prefix
From: |
Mike Frysinger |
Subject: |
[PATCH acl] libmisc: rename internal obj APIs with __acl_ prefix |
Date: |
Sun, 11 Feb 2024 20:08:50 -0500 |
While this is already using a __ prefix to avoid symbol collisions
when static linking, move it to __acl_ to align with all the other
symbols we internalize.
---
libacl/__libobj.c | 14 +++++++-------
libacl/libobj.h | 24 ++++++++++++------------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/libacl/__libobj.c b/libacl/__libobj.c
index 906e0fd0c77e..b1b9f82aee07 100644
--- a/libacl/__libobj.c
+++ b/libacl/__libobj.c
@@ -31,7 +31,7 @@
/* object creation, destruction, conversion and validation */
void *
-__new_var_obj_p(int magic, size_t size)
+__acl_new_var_obj_p(int magic, size_t size)
{
obj_prefix *obj_p = (obj_prefix *)malloc(size);
if (obj_p) {
@@ -43,7 +43,7 @@ __new_var_obj_p(int magic, size_t size)
void
-__new_obj_p_here(int magic, void *here)
+__acl_new_obj_p_here(int magic, void *here)
{
obj_prefix *obj_p = here;
obj_p->p_magic = (long)magic;
@@ -52,7 +52,7 @@ __new_obj_p_here(int magic, void *here)
void
-__free_obj_p(obj_prefix *obj_p)
+__acl_free_obj_p(obj_prefix *obj_p)
{
obj_p->p_magic = 0;
if (obj_p->p_flags & OBJ_MALLOC_FLAG)
@@ -61,7 +61,7 @@ __free_obj_p(obj_prefix *obj_p)
obj_prefix *
-__check_obj_p(obj_prefix *obj_p, int magic)
+__acl_check_obj_p(obj_prefix *obj_p, int magic)
{
if (!obj_p || obj_p->p_magic != (long)magic) {
errno = EINVAL;
@@ -73,10 +73,10 @@ __check_obj_p(obj_prefix *obj_p, int magic)
#ifdef LIBACL_DEBUG
obj_prefix *
-__ext2int_and_check(void *ext_p, int magic, const char *typename)
+__acl_ext2int_and_check(void *ext_p, int magic, const char *typename)
#else
obj_prefix *
-__ext2int_and_check(void *ext_p, int magic)
+__acl_ext2int_and_check(void *ext_p, int magic)
#endif
{
obj_prefix *obj_p = ((obj_prefix *)ext_p)-1;
@@ -88,6 +88,6 @@ __ext2int_and_check(void *ext_p, int magic)
errno = EINVAL;
return NULL;
}
- return __check_obj_p(obj_p, magic);
+ return __acl_check_obj_p(obj_p, magic);
}
diff --git a/libacl/libobj.h b/libacl/libobj.h
index 94ce2d684be5..9da72ee33f87 100644
--- a/libacl/libobj.h
+++ b/libacl/libobj.h
@@ -26,26 +26,26 @@
#ifdef LIBACL_DEBUG
# define ext2int(T, ext_p) \
- ((T##_obj *)__ext2int_and_check(ext_p, T##_MAGIC, #T))
+ ((T##_obj *)__acl_ext2int_and_check(ext_p, T##_MAGIC, #T))
#else
# define ext2int(T, ext_p) \
- ((T##_obj *)__ext2int_and_check(ext_p, T##_MAGIC))
+ ((T##_obj *)__acl_ext2int_and_check(ext_p, T##_MAGIC))
#endif
#define int2ext(int_p) \
((int_p) ? &(int_p)->i : NULL)
#define new_var_obj_p(T, sz) \
- ((T##_obj *)__new_var_obj_p(T##_MAGIC, sizeof(T##_obj) + sz))
+ ((T##_obj *)__acl_new_var_obj_p(T##_MAGIC, sizeof(T##_obj) + sz))
#define realloc_var_obj_p(T, p, sz) \
((T##_obj *)realloc(p, sizeof(T##_obj) + sz))
#define new_obj_p(T) \
new_var_obj_p(T, 0)
#define new_obj_p_here(T, p) \
- __new_obj_p_here(T##_MAGIC, p)
+ __acl_new_obj_p_here(T##_MAGIC, p)
#define check_obj_p(T, obj_p) \
- ((T##_obj *)__check_obj_p((obj_prefix *)(obj_p), T##_MAGIC))
+ ((T##_obj *)__acl_check_obj_p((obj_prefix *)(obj_p), T##_MAGIC))
#define free_obj_p(obj_p) \
- (__free_obj_p((obj_prefix *)(obj_p)))
+ __acl_free_obj_p((obj_prefix *)(obj_p))
/* prefix for all objects */
@@ -82,15 +82,15 @@ struct string_obj_tag {
};
/* object creation, destruction, conversion and validation */
-void *__new_var_obj_p(int magic, size_t size) hidden;
-void __new_obj_p_here(int magic, void *here) hidden;
-void __free_obj_p(obj_prefix *obj_p) hidden;
-obj_prefix *__check_obj_p(obj_prefix *obj_p, int magic) hidden;
+void *__acl_new_var_obj_p(int magic, size_t size) hidden;
+void __acl_new_obj_p_here(int magic, void *here) hidden;
+void __acl_free_obj_p(obj_prefix *obj_p) hidden;
+obj_prefix *__acl_check_obj_p(obj_prefix *obj_p, int magic) hidden;
#ifdef LIBACL_DEBUG
-obj_prefix *__ext2int_and_check(void *ext_p, int magic,
+obj_prefix *__acl_ext2int_and_check(void *ext_p, int magic,
const char *typename) hidden;
#else
-obj_prefix *__ext2int_and_check(void *ext_p, int magic) hidden;
+obj_prefix *__acl_ext2int_and_check(void *ext_p, int magic) hidden;
#endif
#endif /* __LIBOBJ_H */
--
2.43.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH acl] libmisc: rename internal obj APIs with __acl_ prefix,
Mike Frysinger <=