On Dec 10, 2017, at 11:21 AM, pelzflorian (Florian Pelz) <pelzflorian@pelzflorian.de> wrote:On Sun, Dec 10, 2017 at 07:22:55AM -0800, Matt Wette wrote:Thank you. I’m sorry to say that it did not work.
Actually it is not the “struct po_error_handler” but the
“struct po_xerror_handler” which I need. I believe the “struct
po_error_handler” is not used anymore in current Gettext but I am not
sure. varargs are not needed for “struct po_xerror_handler” (even
though support for them is desirable in general).
Hmm I tried mostly the same as you propose before for the xerror
handler and it did not work: fh-object-set! apparently did not have
any effect, i.e. a subsequent fh-object-ref returned 0 and on error
the callback handler function was called at address 0, causing a
SIGSEGV.
Either way, I tried your code for “struct po_error_handler” and put it
in my dot.ffi to see if it works.
By the way, what I forgot to mention is that I needed to replace
#include <stdlib.h>
in the gettext-po.h header file by
typedef long size_t;
otherwise “guild compile-ffi gettext-po.ffi” would fail with the error
message
ffi-help: WARNING: the FFI helper is experimental
(unknown):1: not found: "gnu/stubs-32.h"
compile-ffi: parse failed