summaryrefslogtreecommitdiff
path: root/source/fitz/harfbuzz.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-09-14 15:03:05 +0100
committerRobin Watts <robin.watts@artifex.com>2016-09-14 16:24:54 +0100
commit6273edc2e7179a4bd1a542de69871084e1f18daa (patch)
tree67a85b6760a68df2bff404107fc260dfefeb6b32 /source/fitz/harfbuzz.c
parentd79f72365de5b27b31953f614eb35f8a18b91247 (diff)
downloadmupdf-6273edc2e7179a4bd1a542de69871084e1f18daa.tar.xz
Add scripts to remove/replace 'static' from functions.
Getting a backtrace out with missing functions makes the backtrace much less useful. Some backtrace routines (such as that used by Memento on Android) are incapable of resolving static functions. We therefore provide 2 scripts (scripts/destatic.sh and scripts/restatic.sh) that respectively remove and replace the 'static' from function definitions. The scripts do not affect "static inline" or "static const" definitions, and they are are restricted to working in the source directory (excluding source/tools), thirdparty/mujs and the platform/{java,android} directories. The transformed source should NOT be checked in. To avoid problems with clashing symbols, some functions are renamed or tweaked slightly in this patch.
Diffstat (limited to 'source/fitz/harfbuzz.c')
-rw-r--r--source/fitz/harfbuzz.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/fitz/harfbuzz.c b/source/fitz/harfbuzz.c
index c4a0c5f9..e2b4e834 100644
--- a/source/fitz/harfbuzz.c
+++ b/source/fitz/harfbuzz.c
@@ -64,12 +64,12 @@
static fz_context *hb_secret = NULL;
-static void set_context(fz_context *ctx)
+static void set_hb_context(fz_context *ctx)
{
hb_secret = ctx;
}
-static fz_context *get_context()
+static fz_context *get_hb_context()
{
return hb_secret;
}
@@ -78,19 +78,19 @@ void hb_lock(fz_context *ctx)
{
fz_lock(ctx, FZ_LOCK_FREETYPE);
- set_context(ctx);
+ set_hb_context(ctx);
}
void hb_unlock(fz_context *ctx)
{
- set_context(NULL);
+ set_hb_context(NULL);
fz_unlock(ctx, FZ_LOCK_FREETYPE);
}
void *hb_malloc(size_t size)
{
- fz_context *ctx = get_context();
+ fz_context *ctx = get_hb_context();
assert(ctx != NULL);
@@ -99,7 +99,7 @@ void *hb_malloc(size_t size)
void *hb_calloc(size_t n, size_t size)
{
- fz_context *ctx = get_context();
+ fz_context *ctx = get_hb_context();
assert(ctx != NULL);
@@ -108,7 +108,7 @@ void *hb_calloc(size_t n, size_t size)
void *hb_realloc(void *ptr, size_t size)
{
- fz_context *ctx = get_context();
+ fz_context *ctx = get_hb_context();
assert(ctx != NULL);
@@ -117,7 +117,7 @@ void *hb_realloc(void *ptr, size_t size)
void hb_free(void *ptr)
{
- fz_context *ctx = get_context();
+ fz_context *ctx = get_hb_context();
assert(ctx != NULL);