Skip to content

Commit

Permalink
Merge pull request #19 from fonttools/fix-m1
Browse files Browse the repository at this point in the history
Fix M1 segfault
  • Loading branch information
simoncozens authored Mar 7, 2022
2 parents 338d34a + 9b37885 commit fe1dd22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/python/ttfautohint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def __init__(self, path=None, **kwargs):
version_string = lib.TTF_autohint_version_string().decode('ascii')
self.version_string = version_string

# In the M1 ABI, ctypes counts the number of fixed arguments
# when building the varargs array. See https://bugs.python.org/issue42880
lib.TTF_autohint.argtypes = [c_char_p]

def _build_info_data(self, options):
# as a side effect, these arguments are popped from the options dict
# as they are not part of TTF_autohint API
Expand Down

0 comments on commit fe1dd22

Please sign in to comment.