summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-10 13:39:10 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-11 14:35:34 -0800
commit265ea3a77418df2744575f1168f89a33f01e72d4 (patch)
tree7b67b74b0a3b3e519f80b78e56be491acd748653 /utils.h
parent81e51cf1ff494131827df487a0f538c3b07e0407 (diff)
downloadxorg-app-xkbcomp-265ea3a77418df2744575f1168f89a33f01e72d4.tar.gz
Replace uAlloc() and uTypedAlloc() with direct malloc() calls
All these wrappers did was mess with types. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/utils.h b/utils.h
index 0053c84..29e4205 100644
--- a/utils.h
+++ b/utils.h
@@ -29,15 +29,17 @@
/***====================================================================***/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
+#include <stdlib.h>
#include <X11/Xos.h>
#include <X11/Xfuncproto.h>
#include <X11/Xfuncs.h>
#include <stddef.h>
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
#ifndef NUL
#define NUL '\0'
@@ -74,8 +76,6 @@ typedef int Comparison;
/***====================================================================***/
-extern Opaque uAlloc(unsigned /* size */
- );
extern Opaque uCalloc(unsigned /* n */ ,
unsigned /* size */
);
@@ -90,7 +90,6 @@ extern Opaque uRecalloc(Opaque /* old */ ,
extern void uFree(Opaque /* ptr */
);
-#define uTypedAlloc(t) ((t *)uAlloc((unsigned)sizeof(t)))
#define uTypedCalloc(n,t) ((t *)uCalloc((unsigned)n,(unsigned)sizeof(t)))
#define uTypedRealloc(pO,n,t) ((t *)uRealloc((Opaque)pO,((unsigned)n)*sizeof(t)))
#define uTypedRecalloc(pO,o,n,t) ((t *)uRecalloc((Opaque)pO,((unsigned)o),((unsigned)n),sizeof(t)))