summaryrefslogtreecommitdiffstats
path: root/modules/brotli/common/platform.c
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-11-20 09:47:03 +0000
committerMoonchild <moonchild@palemoon.org>2020-11-20 09:47:03 +0000
commit5165ed02285315cc0bed7977c7bac6d0a90ca43c (patch)
tree9b761a21eb924915e51c2d803208e6c01b505a45 /modules/brotli/common/platform.c
parente1db27e19989db11fef70f439cf95821316535b3 (diff)
parentca9abcdf1702c37bf00048dab3f460b2252873a3 (diff)
downloadUXP-RELBASE_20201120.tar
UXP-RELBASE_20201120.tar.gz
UXP-RELBASE_20201120.tar.lz
UXP-RELBASE_20201120.tar.xz
UXP-RELBASE_20201120.zip
Merge branch 'redwood' into releaseRELBASE_20201124RELBASE_20201120RC_20201120
Diffstat (limited to 'modules/brotli/common/platform.c')
-rw-r--r--modules/brotli/common/platform.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/brotli/common/platform.c b/modules/brotli/common/platform.c
new file mode 100644
index 000000000..aef39e93c
--- /dev/null
+++ b/modules/brotli/common/platform.c
@@ -0,0 +1,22 @@
+/* Copyright 2016 Google Inc. All Rights Reserved.
+
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+#include <stdlib.h>
+
+#include "./platform.h"
+#include <brotli/types.h>
+
+/* Default brotli_alloc_func */
+void* BrotliDefaultAllocFunc(void* opaque, size_t size) {
+ BROTLI_UNUSED(opaque);
+ return malloc(size);
+}
+
+/* Default brotli_free_func */
+void BrotliDefaultFreeFunc(void* opaque, void* address) {
+ BROTLI_UNUSED(opaque);
+ free(address);
+}