freetype: Fix copying char buffer of CStringRef on darwin
authorMarvin Scholz <epirat07@gmail.com>
Sat, 17 Jun 2017 14:57:34 +0000 (16:57 +0200)
committerMarvin Scholz <epirat07@gmail.com>
Mon, 19 Jun 2017 12:32:37 +0000 (14:32 +0200)
commit83535f027312639d844095c0783a0669e054728b
tree21f421bb8b1a0b74360ea56f1f3e5b80f7b22847
parentc47357123ee690e764af0ea8d22598e5e97eaf34
freetype: Fix copying char buffer of CStringRef on darwin

To convert a CStringRef to a char buffer, CFStringGetCStringPtr was
used, but the documentation states this can fail in some
circumstances and it does fail on 10.7 for example.

This commit fixes this by adding a helper function, which falls back to
CFStringGetCString, as suggested in the CFStringGetCStringPtr docs.
modules/text_renderer/freetype/fonts/darwin.c