<div dir="ltr"><div>Can not one do this by defining his own malloc/../free in config.h + passing -DHAVE_CONFIG instead?</div><div><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Regards,<br>Konstantin</div></div>
<br><div class="gmail_quote">2015-10-03 16:21 GMT+04:00 Behdad Esfahbod <span dir="ltr"><<a href="mailto:behdad@kemper.freedesktop.org" target="_blank">behdad@kemper.freedesktop.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> src/hb-private.hh | 17 +++++++++++++++++<br>
1 file changed, 17 insertions(+)<br>
<br>
New commits:<br>
commit 52b418555b62a3b25399f202c1fa72ab7288c224<br>
Author: Behdad Esfahbod <<a href="mailto:behdad@behdad.org">behdad@behdad.org</a>><br>
Date: Sat Oct 3 13:20:55 2015 +0100<br>
<br>
Allow compiling with custom allocators<br>
<br>
User can define hb_malloc_impl, etc, to name of custom allocator functions<br>
that have the same signature as malloc.<br>
<br>
diff --git a/src/hb-private.hh b/src/hb-private.hh<br>
index 07550cb..165cd0d 100644<br>
--- a/src/hb-private.hh<br>
+++ b/src/hb-private.hh<br>
@@ -54,6 +54,23 @@<br>
#include <stdarg.h><br>
<br>
<br>
+/* Compile-time custom allocator support. */<br>
+<br>
+#if defined(hb_malloc_impl) \<br>
+ && defined(hb_calloc_impl) \<br>
+ && defined(hb_realloc_impl) \<br>
+ && defined(hb_free_impl)<br>
+extern void* hb_malloc_impl(size_t size);<br>
+extern void* hb_calloc_impl(size_t nmemb, size_t size);<br>
+extern void* hb_realloc_impl(void *ptr, size_t size);<br>
+extern void hb_free_impl(void *ptr);<br>
+#define malloc hb_malloc_impl<br>
+#define calloc hb_calloc_impl<br>
+#define realloc hb_realloc_impl<br>
+#define free hb_free_impl<br>
+#endif<br>
+<br>
+<br>
/* Compiler attributes */<br>
<br>
<br>
_______________________________________________<br>
HarfBuzz mailing list<br>
<a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/harfbuzz</a><br>
</blockquote></div><br></div></div>