This is Bugzilla
View Bug Activity | Format For Printing | XML | Clone This Bug
I'm attaching two patches that make AbiWidget usable from bindings, most of the changes are on API documentation comments. Only two lines of code had to change, provided as a separate patch
Created an attachment (id=5620) [details] Fix confusion between memory allocators The string returned by those functions is documented as g_free-able, and gobject-introspection also really expects gchar* to be malloc()'ed. So this avoids memory corruptions if used from bindings
Created an attachment (id=5621) [details] Finish introspection support This patch includes gtk-doc fixes and makes sure all relevant API calls are introspected, a python override file is also included to have libabiword_init() called implicitly
Created an attachment (id=5622) [details] Install fix That last patch wasn't quite working on build systems where the install root is not / (which is what happens for Fedora builds), since it tries to install to /. Here is a fix that should probably be rolled in.
The Abi.py overrides segfaults when Abi.init(sys.argv) is executed. gdb shows that argc is definitely wrong (thats a lot of args!) #0 0x41fdcdc4 in g_option_context_parse () from /lib/libglib-2.0.so.0 #1 0xb747d24c in AP_Args::parseOptions (this=0xbfff8a84) at ap_Args.cpp:146 #2 0xb72d7868 in libabiword_init (argc=137504704, argv=0x83227c8) at ../src/wp/main/gtk/libabiword.cpp:45 #3 0x420d361a in ffi_call_SYSV () from /lib/libffi.so.5 #4 0x420d3381 in ffi_call () from /lib/libffi.so.5 A workaround is to use Abi.init_noargs() in the override. Then the segfault is gone. Carlos suggested that GTK+ does something similar in its overrides - maybe there is a good reason for this.
(From update of attachment 5620 [details]) Trivial patch, please commit
(In reply to comment #5) > (From update of attachment 5620 [details] [details]) > Trivial patch, please commit > Need the same fix in the gtk2 version of the widget. Will commit both.
Committed all three: trunk@32652 trunk@32662 trunk@32663