0001: This fixes a compile error with MS Visual C++ 2010, due to 
"hb_atomic_int_set" being implemented as a "do ... while(0)" block. (It's 
likely to be an error on other non-GLib platforms, too.)

0002: This adds a "hb_mutex_free" macro that is called by hb_blob_destroy  (to 
free the mutex object created in "hb_blob_create"). If GLib is available, this 
is defined as g_static_mutex_free.
This fixes a bug that leaks GStaticMutex objects; from 
http://developer.gnome.org/glib/unstable/glib-Threads.html#g-static-mutex-free: 
"if you have a GStaticMutex as a member of a structure and the structure is 
freed, you should also free the GStaticMutex."

0003: This implements the HB threading primitives for MSVC on Windows. The 
"hb_atomic_int_*" macros are defined to use various interlocked intrinsics 
supported by the compiler. The "hb_mutex_*" macros are implemented with some 
new functions that delegate to Initialize/Enter/DeleteCriticalSection. 
Note that "#include <Windows.h>" is not allowed in hb-private.hh because 
hb-open-type-private.hh (which includes it) redefines "LONG", "ULONG" and other 
standard Win32 data types with different meanings. (This naming conflict is 
rather unfortunate and makes it a little more difficult to port the library to 
Windows.)

Bradley

Attachment: 0001-Fix-hb_atomic_int_set-usage-for-MSVC.patch
Description: 0001-Fix-hb_atomic_int_set-usage-for-MSVC.patch

Attachment: 0002-Free-mutex-when-blob-is-destroyed.patch
Description: 0002-Free-mutex-when-blob-is-destroyed.patch

Attachment: 0003-Implement-threading-primitives-on-Windows.patch
Description: 0003-Implement-threading-primitives-on-Windows.patch

_______________________________________________
HarfBuzz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to