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 617216 - SoupSession should be marked as abstract class
SoupSession should be marked as abstract class
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2010-04-29 21:12 UTC by Lorenzo Gil Sanchez
Modified: 2010-04-30 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that change the gtype creation (773 bytes, patch)
2010-04-30 07:28 UTC, Lorenzo Gil Sanchez
committed Details | Review

Description Lorenzo Gil Sanchez 2010-04-29 21:12:33 UTC
Right now you can do g_object_new(SOUP_TYPE_SESSION, NULL) even if you are not supposed to do it and gobject does not give a warning because the class is not marked as an abstract class.

I discovered this (with Dan's help) when running this piece of javascript code:

const Soup = imports.gi.Soup;

let session = new Soup.Session ();
let status = session.send_message(Soup.Message.new ('GET', 'http://www.google.com'));
print (status);


because this is my first libsoup programm and I forget to use Soup.SessionSync instead of Soup.Session.

Marking SoupSession as abstract class would have saved me a nice time :-)
Comment 1 Lorenzo Gil Sanchez 2010-04-30 07:28:33 UTC
Created attachment 159961 [details] [review]
Patch that change the gtype creation
Comment 2 Dan Winship 2010-04-30 13:16:25 UTC
thanks. I fixed SoupAuth and SoupAuthDomain too