[HarfBuzz] harfbuzz-ng: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Mar 1 17:32:45 PST 2012


 src/hb-blob.cc           |    2 +-
 src/hb-object-private.hh |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bc71ad4973842f25216b48842a46d6c9cbce6aa3
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Mar 1 17:30:29 2012 -0800

    Fix atomic-int op on Apple
    
    The OSAtomicAdd32Barrier operator returns the new value, we want the
    old value.

diff --git a/src/hb-blob.cc b/src/hb-blob.cc
index b2b1d9c..ee997ad 100644
--- a/src/hb-blob.cc
+++ b/src/hb-blob.cc
@@ -301,7 +301,7 @@ _try_writable (hb_blob_t *blob)
     return TRUE;
 
 
-  DEBUG_MSG_FUNC (BLOB, blob, "currect data is -> %p\n", blob->data);
+  DEBUG_MSG_FUNC (BLOB, blob, "current data is -> %p\n", blob->data);
 
   char *new_data;
 
diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh
index b96f6d8..0cb5ebd 100644
--- a/src/hb-object-private.hh
+++ b/src/hb-object-private.hh
@@ -72,7 +72,7 @@ typedef long hb_atomic_int_t;
 
 #include <libkern/OSAtomic.h>
 typedef int32_t hb_atomic_int_t;
-#define hb_atomic_int_add(AI, V)	OSAtomicAdd32Barrier(V, &(AI))
+#define hb_atomic_int_add(AI, V)	(OSAtomicAdd32Barrier((V), &(AI)), (AI) - (V))
 #define hb_atomic_int_get(AI)		OSAtomicAdd32Barrier(0, &(AI))
 
 #else



More information about the HarfBuzz mailing list