Skip to content

Commit

Permalink
Work around segfault calling error callback. See #14
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Mar 7, 2022
1 parent 338d34a commit 142f4f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/python/ttfautohint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from io import open
import sys
import os
import platform

from ttfautohint._version import __version__
from ttfautohint import memory
Expand Down Expand Up @@ -100,6 +101,10 @@ def ttfautohint(self, **kwargs):
out_buffer_p = POINTER(c_char)()
out_buffer_len = c_size_t(0)

# For some reason the error callback causes a segfault on M1. See #14
if platform.system() == "Darwin" and platform.processor() == "arm64":
error_callback = None

option_keys, option_values = format_varargs(
out_buffer=byref(out_buffer_p),
out_buffer_len=byref(out_buffer_len),
Expand Down

0 comments on commit 142f4f4

Please sign in to comment.