Pywebkitgtk new object bindings help

12 views
Skip to first unread message

Pedro Abranches

unread,
Jan 3, 2012, 8:00:45 AM1/3/12
to pywebkitgtk-devel
Hi.

I'm trying to implement a "get_headers" function in network_response
in
pywebkit, but i'm having some problems with the bindings.

I added this to the types definitions, webkit/webkit-1.1-types.defs:

(define-object SoupMessage
(in-module "Soup")
(parent "GObject")
(c-name "SoupMessage")
(gtype-id "SOUP_TYPE_MESSAGE")
)

(define-object SoupMessageHeaders
(in-module "Soup")
(parent "GObject")
(c-name "SoupMessageHeaders")
(gtype-id "SOUP_TYPE_MESSAGE_HEADERS")
)

It compiles with no problems by when running the python script I get

ImportError: /usr/local/lib/python2.7/dist-packages/webkit/webkit.so:
undefined symbol: SOUP_MESSAGE_HEADERS

I must admit that I still didn't get really well all this c++/python
binding stuff, so this may be a really silly error.

By defining the object SoupMessageHeaders, when doing
message.get_property("response_headers") will return the correct type
instead of gobject.GBoxed right?

Thanks,
Pedro Abranches

Pedro Abranches

unread,
Jan 3, 2012, 7:54:45 AM1/3/12
to pyweb...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages