After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677002 - get_content_type() out hash type needs to be annotated
get_content_type() out hash type needs to be annotated
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: API
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2012-05-29 00:00 UTC by Pavol Klačanský
Modified: 2012-06-12 11:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavol Klačanský 2012-05-29 00:00:59 UTC
I get this error message

** (floaty-client:7058): CRITICAL **: Unsupported type void

** (floaty-client:7058): CRITICAL **: Unsupported type void

Program received signal SIGBUS, Bus error.
0x00000000004211dd in PyObject_Hash ()
Comment 1 Martin Pitt 2012-06-05 10:03:37 UTC
Can you please attach a small reproducer Python script or at least instructions how to reproduce this? Thanks!
Comment 2 Pavol Klačanský 2012-06-05 10:22:52 UTC
from gi.repository import Soup

session = Soup.SessionSync()
message = Soup.Message.new('GET', 'http://ubuntu.com')
session.send_message(message)
print(message.response_headers.get_content_type())
Comment 3 Martin Pitt 2012-06-05 14:02:26 UTC
Ultimately this is a Soup annotation bug. A pointer -> pointer hash table is not introspectable:

      <method name="get_content_type"
[...]
          <parameter name="params"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     allow-none="1">
            <doc xml:whitespace="preserve">return location for the Content-Type parameters (eg, "charset"), or %NULL</doc>
            <type name="GLib.HashTable" c:type="GHashTable**">
              <type name="gpointer" c:type="gpointer"/>
              <type name="gpointer" c:type="gpointer"/>
            </type>
          </parameter>

The documentation sounds like this should just be annotated with "(element-type utf8 utf8)".
Comment 4 Dan Winship 2012-06-12 11:16:00 UTC
For some reason, get_content_disposition() was properly annotated, but
get_content_type() wasn't... Fixed now. Thanks