GIRParser incorrectly accepts closure/destroy information for GLib.Callback parameters
Hello. I'm trying to add a status code handler to my message, but it says it expects 5 arguments. I think it's because in C, we need to provide the pointer data.
message.add_status_code_handler ("finished", 401, () => {
stderr.printf ("ERROR: User credentials were incorrect. \n");
});
error: too few arguments to function call, expected 5, have 4
soup_message_add_status_code_handler (message, "finished", (guint) 401, ____lambda4__gcallback);
But when I try to add the missing parameter:
message.add_status_code_handler ("finished", 401, () => {
stderr.printf ("ERROR: User credentials were incorrect. \n");
}, null);
It gives me the following error:
error: 1 extra arguments for `uint Soup.Message.add_status_code_handler (string, uint, GLib.Callback)'
What should I do, please help me! I'm reading the latest documentation and using libsoup-2.4
.
Edited by Rico Tzschichholz