APPROVE COMMIT 21.5
On Thu, Mar 7, 2013 at 3:27 PM, Jerry James <james(a)xemacs.org> wrote:
I happened to stumble across stack_like_malloc() and
stack_like_free()
and wondered what uses they had. Grep shows that they are used only
in intl-win32.c. In that case, they're just taking up space in
non-Windows builds, so let's turn them off there until somebody comes
up with a non-Windows use for them.
This seems obviously correct to me, so I'm going to commit it. Yell
at me if I broke something. Also, we should really put the #ifdef
around the prototypes in array.h also, so the patch I am actually
committing is this one:
diff -r 0e2f2837c2bd src/ChangeLog
--- a/src/ChangeLog Wed Mar 06 21:05:12 2013 -0700
+++ b/src/ChangeLog Fri Mar 08 13:40:58 2013 -0700
@@ -1,3 +1,9 @@
+2013-03-07 Jerry James <james(a)xemacs.org>
+
+ * array.c (stack_like_malloc): Define only if WIN32_ANY.
+ (stack_like_free): Ditto.
+ * array.h: Ditto.
+
2013-03-04 Jerry James <james(a)xemacs.org>
* config.h.in: Add placeholders and definitions needed for large
diff -r 0e2f2837c2bd src/array.c
--- a/src/array.c Wed Mar 06 21:05:12 2013 -0700
+++ b/src/array.c Fri Mar 08 13:40:58 2013 -0700
@@ -469,6 +469,7 @@
#endif /* MEMORY_USAGE_STATS */
+#ifdef WIN32_ANY
/*****************************************************************************/
/* stack-like allocation */
/*****************************************************************************/
@@ -540,6 +541,7 @@
ABORT ();
}
}
+#endif /* WIN32_ANY */
/*****************************************************************************/
diff -r 0e2f2837c2bd src/array.h
--- a/src/array.h Wed Mar 06 21:05:12 2013 -0700
+++ b/src/array.h Fri Mar 08 13:40:58 2013 -0700
@@ -608,9 +608,10 @@
/** Stack-like malloc/free **/
/************************************************************************/
+#ifdef WIN32_ANY
void *stack_like_malloc (Bytecount size);
void stack_like_free (void *val);
-
+#endif
/************************************************************************/
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches