GNOME Bugzilla – Bug 631834
libsoup-2.4 Invalid type_cname in generated VAPI
Last modified: 2010-10-16 07:44:39 UTC
Created attachment 172062 [details] example code that triggers the error Hi there, I tried to implement a Soup.SessionFeature, but it turned out the libsoup VAPI got an error that leads to invalid C code. Clang provided a good hint where to search for the error: $ valac -c --cc clang --pkg libsoup-2.4 TestFeature.vala TestFeature.vala.c:32:8: error: unknown type name 'SoupSessionFeatureIface'; did you mean 'SoupSessionFeatureInterface'? static SoupSessionFeatureIface* test_feature_soup_session_feature_parent_iface = NULL; ^~~~~~~~~~~~~~~~~~~~~~~ SoupSessionFeatureInterface In file included from /home/pascal/Projekte/vala/download/dlclass/TestFeature.vala.c:7: In file included from /usr/include/libsoup-2.4/libsoup/soup.h:37: /usr/include/libsoup-2.4/libsoup/soup-session-feature.h:40:3: note: 'SoupSessionFeatureInterface' declared here } SoupSessionFeatureInterface; ^ /home/pascal/Projekte/vala/download/dlclass/TestFeature.vala.c:104:63: error: unknown type name 'SoupSessionFeatureIface'; did you mean 'SoupSessionFeatureInterface'? static void test_feature_soup_session_feature_interface_init (SoupSessionFeatureIface * iface) { ^~~~~~~~~~~~~~~~~~~~~~~ SoupSessionFeatureInterface In file included from /home/pascal/Projekte/vala/download/dlclass/TestFeature.vala.c:7: In file included from /usr/include/libsoup-2.4/libsoup/soup.h:37: /usr/include/libsoup-2.4/libsoup/soup-session-feature.h:40:3: note: 'SoupSessionFeatureInterface' declared here } SoupSessionFeatureInterface; ^ 2 errors generated. error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) The error can be fixed manually by extending the libsoup-2.4.vapi with a proper type_cname: [CCode (cheader_filename = "libsoup/soup.h", type_cname = "SoupSessionFeatureInterface") ] public interface SessionFeature : GLib.Object { public abstract void attach (Soup.Session session); public abstract void detach (Soup.Session session); [NoWrapper] public abstract void request_queued (Soup.Session session, Soup.Message msg); [NoWrapper] public abstract void request_started (Soup.Session session, Soup.Message msg, Soup.Socket socket); [NoWrapper] public abstract void request_unqueued (Soup.Session session, Soup.Message msg); } But as the code seems to be automatically generated that should only work as temporary work-around. Cheers, Pascal
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 625026 ***