Dr.Leo
unread,Jul 21, 2012, 11:19:58 AM7/21/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyhy...@googlegroups.com
Hi,
in an effort to make PyHyphen run on all flavors of Windows without
users needing to compile it, I would like to ad a DLL to the source
distribution and wrap it using ctypes.
However, as I am a seasoned C programmer at best, and have no or little
knowledge of ctypes from the Python standard library, I don't know how
to call the relevant C function. Its header is this:
int hnj_hyphen_hyphenate2 (HyphenDict *dict,
const char *word, int word_size, char * hyphens,
char *hyphenated_word, char *** rep, int ** pos, int ** cut);
So can anyone send me the handfull of lines of ctypes declarations to
call this function properly? I am also confused by the fact that
hyphen.c allocates memory for rep, pos and cut rather than using a
buffer allocated by ctypes. So I really really don't know how to go
further on what I think would be a useful enhancement to PyHyphen.
Thanks in advance.
Leo