misaka icon indicating copy to clipboard operation
misaka copied to clipboard

Issue new version?

Open vsolovyov opened this issue 5 years ago • 1 comments

Hello, when I import Misaka (2.1.1) it fails in callbacks:

env/lib/python3.9/site-packages/misaka/callbacks.py in <module>
      8 @ffi.callback('void(hoedown_buffer *ob, const hoedown_buffer *text, '
      9               '     const hoedown_buffer *lang, const hoedown_renderer_data *data)')
---> 10 def cb_blockcode(ob, text, lang, data):
     11     renderer = ffi.from_handle(lib.misaka_get_renderer(data))
     12     text = to_string(text)

MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks

Surely, cffi docs are pretty helpful and they say these are some old-style callbacks yadda-yadda. I see that the latest version on github has already converted to new-style callbacks, so I tried to install from master and it seems to work ok (I only tried the simplest markdown).

TL;DR: On MacOS 10.14.6 misaka 2.1.1 worked flawlessly. On MacOS 11.3 it doesn't, but master works.

So maybe issue a new version of misaka that already contains these fixes?

vsolovyov avatar Apr 27 '21 15:04 vsolovyov

Get the same issue on MacOS 12.3.1

MorvanZhou avatar May 06 '22 05:05 MorvanZhou