GNOME Bugzilla – Bug 757146
Use export-dynamic to export the symbols and add an AVAILABLE_IN_2_4 for all the symbols not marked already
Last modified: 2015-11-24 14:54:04 UTC
In the branch wip/nacho/soup-extern (let me know if I should attach the patches here) there are a few things fixed: first a _SOUP_EXTERN define is defined which basically is a "extern" on linux and the windows magic on Windows (the windows magic is added in a config file, which will be added upstream once the msvc projects are ready) second the sym files are removed. This means the private methods are now marked as internal so only the methods that were in the sym files are getting exported.
Created attachment 314154 [details] [review] Provide a _SOUP_EXTERN so we ensure the methods get externalized Change the defines to endup using _SOUP_EXTERN so we get them externalized.
Created attachment 314155 [details] [review] Remove AVAILABLE from methods marked as DEPRECATED GLib and Gtk do the same so let's do it so we avoid having the extern defined twice
Created attachment 314156 [details] [review] Add SOUP_AVAILABLE_IN_2_4 and mark externalized methods with it This way we can as well redefine _SOUP_EXTERN on msvc builds with the right extern value needed for it. This is the same we do on glib and gtk+
Created attachment 314157 [details] [review] Remove .sym files since they are not needed anymore We use -export-dynamic and we mark the methods that we do not want to export as INTERNAL
Created attachment 314158 [details] [review] Fix some signed/unsigned missmatch warnings
Adding here also the patch for the warnings, since anyway it was related with the msvc builds.
(In reply to Ignacio Casal Quinteiro (nacho) from comment #2) > Created attachment 314155 [details] [review] [review] > Remove AVAILABLE from methods marked as DEPRECATED > > GLib and Gtk do the same so let's do it so we avoid > having the extern defined twice Ah, right, I knew there was some reason I didn't like the GLib system. I would prefer to have it so that only the AVAILABLE_IN macros do the exporting, so that we can still specify both AVAILABLE_IN and DEPRECATED_IN versions on a symbol.
(In reply to Dan Winship from comment #7) > (In reply to Ignacio Casal Quinteiro (nacho) from comment #2) > > Created attachment 314155 [details] [review] [review] [review] > > Remove AVAILABLE from methods marked as DEPRECATED > > > > GLib and Gtk do the same so let's do it so we avoid > > having the extern defined twice > > Ah, right, I knew there was some reason I didn't like the GLib system. > > I would prefer to have it so that only the AVAILABLE_IN macros do the > exporting, so that we can still specify both AVAILABLE_IN and DEPRECATED_IN > versions on a symbol. So, I double checked and we can't go that way, since GLIB_DEPRECATED means extern as well, so we would end up with extern extern. We really need to have AVAILABLE or DEPRECATED but not both at the same time.
Scratch my last comment. New patches are coming.
Created attachment 314198 [details] [review] Mark externalized methods with SOUP_AVAILABLE_IN_2_4 This way we can as well redefine _SOUP_EXTERN on msvc builds with the right extern value needed for it. This is the same we do on glib and gtk+
Created attachment 314199 [details] [review] Properly handle the visibility of the methods
Created attachment 314200 [details] [review] Provide a _SOUP_EXTERN so we ensure the methods get externalized Change the defines to endup using _SOUP_EXTERN so we get them externalized.
Created attachment 314202 [details] [review] Provide a _SOUP_EXTERN so we ensure the methods get externalized Change the defines to endup using _SOUP_EXTERN so we get them externalized.
Created attachment 314203 [details] [review] Mark externalized methods with SOUP_AVAILABLE_IN_2_4 This way we can as well redefine _SOUP_EXTERN on msvc builds with the right extern value needed for it. This is the same we do on glib and gtk+
Created attachment 314204 [details] [review] Properly handle the visibility of the methods
Created attachment 314219 [details] [review] Declare a SOUP_VAR to externalize variables This is needed to properly externalize the variables on windows. Since we need to handle dllexport vs dllimport
Created attachment 314376 [details] [review] Declare a SOUP_VAR to externalize variables This is needed to properly externalize the variables on windows. Since we need to handle dllexport vs dllimport
Created attachment 314377 [details] [review] websocket-test: remove useless include This way we can build it on windows
Created attachment 314403 [details] [review] Do not mark private method as available
This is the current diff after all those changes: --- libsoup.txt 2015-10-29 15:27:46.890745263 +0100 +++ ../../libsoup.master.txt 2015-10-26 16:52:45.679773582 +0100 @@ -24,4 +23,0 @@ -__bss_start -_end -_fini -_init @@ -306,0 +303 @@ +soup_message_io_cleanup soup_message_io_cleanup is a private method that was marked before as external. Now it should be fixed with these patches.
(In reply to Ignacio Casal Quinteiro (nacho) from comment #20) > +soup_message_io_cleanup > > soup_message_io_cleanup is a private method that was marked before as > external. Now it should be fixed with these patches. oh, no, that's actually intentional. There were people using it from before libsoup started doing symbol visibility. (eg, bug 687758, bug 687468). Those are both fixed now but there might have been others.
I guess the solution then, is to add the AVAILABLE macro to it. Thoughts?
Created attachment 314410 [details] [review] Mark soup_message_io_cleanup as available Even if it is private it was exported before so we need to keep it that way.
Comment on attachment 314202 [details] [review] Provide a _SOUP_EXTERN so we ensure the methods get externalized The commit message here isn't very good. Maybe be more explicit that this is just about setting things up for a later patch. >+#ifdef HAVE_CONFIG_H >+#include <config.h> >+#endif You shouldn't include config.h from an installed header. >+#define SOUP_DEPRECATED G_DEPRECATED >... >-# define SOUP_DEPRECATED_IN_2_24 GLIB_DEPRECATED >+# define SOUP_DEPRECATED_IN_2_24 SOUP_DEPRECATED This is a distinct bugfix from the rest of the patch; the glib docs explicitly say to use G_DEPRECATED rather than GLIB_DEPRECATED, so all this code was wrong before and that should be fixed separately from the extern stuff.
Created attachment 314644 [details] [review] Use G_DEPRECATED instead of GLIB_DEPRECATED As pointed out by the docs we should use G_DEPRECATED instead of GLIB_DEPRECATED
Comment on attachment 314203 [details] [review] Mark externalized methods with SOUP_AVAILABLE_IN_2_4 >Subject: [PATCH] Mark externalized methods with SOUP_AVAILABLE_IN_2_4 "Mark all remaining public methods with SOUP_AVAILABLE_IN_2_4" >--- a/Makefile.glib >+++ b/Makefile.glib although it's not clear if it's ever going to happen now, this is supposed to be a generic non-libsoup-specific header (bug 654395). So, don't make libsoup-specific changes to it; set soup_enum_types_MKENUMS_H_FLAGS in libsoup/Makefile.am. "But Dan, that won't work, it doesn't let you override --vhead". Grumble grumble. Yeah, not sure. Although: >+ --vhead "SOUP_AVAILABLE_IN_2_4 GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())\n" \ "SOUP_AVAILABLE_IN_2_4" is wrong anyway; if we can't get the right version numbers, we should be using just _SOUP_EXTERN. >-extern gpointer _SOUP_METHOD_OPTIONS; >+SOUP_AVAILABLE_IN_2_4 >+gpointer _SOUP_METHOD_OPTIONS; Those need to be marked "extern" even on unix. You need to do the equivalent of the GLIB_VAR stuff. (likewise with other exported variables) > #include <glib-object.h> >+#include <libsoup/soup-types.h> You can drop <glib-object.h> when adding <libsoup/soup-types.h> >+SOUP_AVAILABLE_IN_2_4 >+SOUP_DEPRECATED_IN_2_42 > GType soup_session_async_get_type (void); This wasn't an oversight; I had left the old soup-session-async and soup-session-sync methods undeprecated to give people time to port over without getting annoying warnings. I think it's probably time to deprecate them now, but that should be a separate patch. (And should involve fixing all the warnings this causes in tests/ and examples/. So feel free to just skip that for now.) >-/* SOUP_AVAILABLE_IN_2_30 -- this trips up gtkdoc-scan */ >+SOUP_AVAILABLE_IN_2_30 > SOUP_DEPRECATED_IN_2_38_FOR (soup_session_prefetch_dns) > void soup_session_prepare_for_uri (SoupSession *session, Hm... I'd forgotten about this. Need to figure out the current status here with gtk-doc.
Comment on attachment 314204 [details] [review] Properly handle the visibility of the methods >- -export-symbols $(srcdir)/libsoup-2.4.sym \ >+ -export-dynamic \ Is -export-dynamic actually needed here?
Comment on attachment 314376 [details] [review] Declare a SOUP_VAR to externalize variables ok, right. but this is in the wrong order in the commit chain; you shouldn't first break it and then fix it again
Attachment 314377 [details] pushed as cd43855 - websocket-test: remove useless include Attachment 314403 [details] pushed as 7e4e2c0 - Do not mark private method as available
Created attachment 314701 [details] [review] Mark old session-(async|sync) methods as deprecated They were not marked as deprecated yet to give people time to port over without getting annoying warnings. Now that we are at the start of a cycle let's mark them. Fix all the consequent deprecation warnings.
Created attachment 314702 [details] [review] Use the proper glib version macros Use G_DEPRECATED instead of GLIB_DEPRECATED and G_ENCODE_VERSION instead of our own macro
Created attachment 314706 [details] [review] Provide a _SOUP_EXTERN so we ensure the methods get externalized Change the defines to endup using _SOUP_EXTERN so we get them externalized.
Created attachment 314707 [details] [review] Declare a SOUP_VAR to externalize variables This is needed to properly externalize the variables on windows. Since we need to handle dllexport vs dllimport
Created attachment 314710 [details] [review] Makefile.glib: ensure config.h is included if needed
Created attachment 314711 [details] [review] Include config.h if needed in the files that do not include it yet
Created attachment 314713 [details] [review] Makefile.glib patch For the Makefile.glib issue, what about the following approach: we add a GLIB_MKENUMS_EXTERN to the template and then we make sure in our H_FLAGS to define it as _SOUP_EXTERN. If the approach is ok, I can split this patch in two: a change to Makefile.glib to be fed back into glib and the Makefile.am part to be squashed into nacho's patchset
Created attachment 314720 [details] [review] Makefile.glib pach Actually, let me split that up already, so that if it is ok it can go in
Created attachment 314721 [details] [review] Rebased patch to export all methods Nacho's patch, rebased to use the modified Makefile.glib
Comment on attachment 314701 [details] [review] Mark old session-(async|sync) methods as deprecated >+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS; > if (!item->new_api) { > gboolean blocking = > SOUP_IS_SESSION_SYNC (item->session) || > (!SOUP_IS_SESSION_ASYNC (item->session) && !item->async); > io_run (item->msg, blocking); > } >+ G_GNUC_END_IGNORE_DEPRECATIONS; You can wrap just the declaration/assignment (leaving io_run() outside the IGNORE_DEPRECATIONS). >+SOUP_DEPRECATED_IN_2_42 > SoupSession *soup_session_async_new (void); >+SOUP_DEPRECATED_IN_2_42 > SoupSession *soup_session_async_new_with_options (const char *optname1, > ...) G_GNUC_NULL_TERMINATED; SOUP_DEPRECATED_IN_2_42_FOR(soup_session_new), etc >+is_session_sync(SoupSession *session) space before the "(" >+{ >+ gboolean is_sync = FALSE; >+ >+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS; >+ is_sync = SOUP_IS_SESSION_SYNC (session); >+ G_GNUC_END_IGNORE_DEPRECATIONS; >+ >+ return is_sync; >+} You can do just G_GNUC_BEGIN_IGNORE_DEPRECATIONS return SOUP_IS_SESSION_SYNC (session); G_GNUC_END_IGNORE_DEPRECATIONS
Comment on attachment 314706 [details] [review] Provide a _SOUP_EXTERN so we ensure the methods get externalized >From bdd5042203bc8f9f33e36ebd0bfcd926d0529039 Mon Sep 17 00:00:00 2001 >From: Ignacio Casal Quinteiro <icq@gnome.org> >Date: Mon, 26 Oct 2015 15:47:13 +0100 >Subject: [PATCH] Provide a _SOUP_EXTERN so we ensure the methods get > externalized > >Change the defines to endup using _SOUP_EXTERN so we get >them externalized. > >https://bugzilla.gnome.org/show_bug.cgi?id=757146 >--- > libsoup/soup-version.h.in | 66 ++++++++++++++++++++++++++--------------------- > 1 file changed, 36 insertions(+), 30 deletions(-) > >diff --git a/libsoup/soup-version.h.in b/libsoup/soup-version.h.in >index 86a352d..5c2c7a3 100644 >--- a/libsoup/soup-version.h.in >+++ b/libsoup/soup-version.h.in >@@ -22,6 +22,10 @@ G_BEGIN_DECLS > (SOUP_MAJOR_VERSION == (major) && SOUP_MINOR_VERSION == (minor) && \ > SOUP_MICRO_VERSION >= (micro))) > >+#ifndef _SOUP_EXTERN >+#define _SOUP_EXTERN extern >+#endif >+ > guint soup_get_major_version (void); > > guint soup_get_minor_version (void); >@@ -89,6 +93,8 @@ gboolean soup_check_version (guint major, > #error "SOUP_VERSION_MIN_REQUIRED must be >= SOUP_VERSION_2_24" > #endif > >+#define SOUP_AVAILABLE_IN_2_4 _SOUP_EXTERN >+ > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_24 > # define SOUP_DEPRECATED_IN_2_24 G_DEPRECATED > # define SOUP_DEPRECATED_IN_2_24_FOR(f) G_DEPRECATED_FOR(f) >@@ -98,9 +104,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_24 >-# define SOUP_AVAILABLE_IN_2_24 GLIB_UNAVAILABLE(2, 24) >+# define SOUP_AVAILABLE_IN_2_24 G_UNAVAILABLE(2, 24) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_24 >+# define SOUP_AVAILABLE_IN_2_24 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_26 >@@ -112,9 +118,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_26 >-# define SOUP_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE(2, 26) >+# define SOUP_AVAILABLE_IN_2_26 G_UNAVAILABLE(2, 26) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_26 >+# define SOUP_AVAILABLE_IN_2_26 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_28 >@@ -126,9 +132,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_28 >-# define SOUP_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE(2, 28) >+# define SOUP_AVAILABLE_IN_2_28 G_UNAVAILABLE(2, 28) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_28 >+# define SOUP_AVAILABLE_IN_2_28 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_30 >@@ -140,9 +146,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_30 >-# define SOUP_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE(2, 30) >+# define SOUP_AVAILABLE_IN_2_30 G_UNAVAILABLE(2, 30) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_30 >+# define SOUP_AVAILABLE_IN_2_30 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_32 >@@ -154,9 +160,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_32 >-# define SOUP_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE(2, 32) >+# define SOUP_AVAILABLE_IN_2_32 G_UNAVAILABLE(2, 32) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_32 >+# define SOUP_AVAILABLE_IN_2_32 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_34 >@@ -168,9 +174,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_34 >-# define SOUP_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE(2, 34) >+# define SOUP_AVAILABLE_IN_2_34 G_UNAVAILABLE(2, 34) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_34 >+# define SOUP_AVAILABLE_IN_2_34 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_36 >@@ -182,9 +188,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_36 >-# define SOUP_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE(2, 36) >+# define SOUP_AVAILABLE_IN_2_36 G_UNAVAILABLE(2, 36) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_36 >+# define SOUP_AVAILABLE_IN_2_36 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_38 >@@ -196,9 +202,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_38 >-# define SOUP_AVAILABLE_IN_2_38 GLIB_UNAVAILABLE(2, 38) >+# define SOUP_AVAILABLE_IN_2_38 G_UNAVAILABLE(2, 38) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_38 >+# define SOUP_AVAILABLE_IN_2_38 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_40 >@@ -210,9 +216,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_40 >-# define SOUP_AVAILABLE_IN_2_40 GLIB_UNAVAILABLE(2, 40) >+# define SOUP_AVAILABLE_IN_2_40 G_UNAVAILABLE(2, 40) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_40 >+# define SOUP_AVAILABLE_IN_2_40 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_42 >@@ -224,9 +230,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_42 >-# define SOUP_AVAILABLE_IN_2_42 GLIB_UNAVAILABLE(2, 42) >+# define SOUP_AVAILABLE_IN_2_42 G_UNAVAILABLE(2, 42) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_42 >+# define SOUP_AVAILABLE_IN_2_42 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_44 >@@ -238,9 +244,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_44 >-# define SOUP_AVAILABLE_IN_2_44 GLIB_UNAVAILABLE(2, 44) >+# define SOUP_AVAILABLE_IN_2_44 G_UNAVAILABLE(2, 44) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_44 >+# define SOUP_AVAILABLE_IN_2_44 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_46 >@@ -252,9 +258,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_46 >-# define SOUP_AVAILABLE_IN_2_46 GLIB_UNAVAILABLE(2, 46) >+# define SOUP_AVAILABLE_IN_2_46 G_UNAVAILABLE(2, 46) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_46 >+# define SOUP_AVAILABLE_IN_2_46 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_48 >@@ -266,9 +272,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_48 >-# define SOUP_AVAILABLE_IN_2_48 GLIB_UNAVAILABLE(2, 48) >+# define SOUP_AVAILABLE_IN_2_48 G_UNAVAILABLE(2, 48) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_48 >+# define SOUP_AVAILABLE_IN_2_48 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_50 >@@ -280,9 +286,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_50 >-# define SOUP_AVAILABLE_IN_2_50 GLIB_UNAVAILABLE(2, 50) >+# define SOUP_AVAILABLE_IN_2_50 G_UNAVAILABLE(2, 50) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_50 >+# define SOUP_AVAILABLE_IN_2_50 _SOUP_EXTERN > #endif > > #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_52 >@@ -294,9 +300,9 @@ gboolean soup_check_version (guint major, > #endif > > #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_52 >-# define SOUP_AVAILABLE_IN_2_52 GLIB_UNAVAILABLE(2, 52) >+# define SOUP_AVAILABLE_IN_2_52 G_UNAVAILABLE(2, 52) _SOUP_EXTERN > #else >-# define SOUP_AVAILABLE_IN_2_52 >+# define SOUP_AVAILABLE_IN_2_52 _SOUP_EXTERN > #endif > > G_END_DECLS >-- >2.4.3
(oops)
OK, assuming this builds on mingw and msvc, and passes "make check" on mingw at least to the same extent that it used to, and passes "make distcheck" on linux (with all optional packages installed so no tests get skipped), then this is ok to commit.
Attachment 314710 [details] pushed as 67241fe - Makefile.glib: ensure config.h is included if needed Attachment 314711 [details] pushed as b61dcb1 - Include config.h if needed in the files that do not include it yet
Comment on attachment 314702 [details] [review] Use the proper glib version macros Attachment 314702 [details] pushed as fd08165 - Use the proper glib version macros
Attachment 314204 [details] pushed as e849cc1 - Properly handle the visibility of the methods Attachment 314410 [details] pushed as 30bd9de - Mark soup_message_io_cleanup as available Attachment 314706 [details] pushed as 903e5fd - Provide a _SOUP_EXTERN so we ensure the methods get externalized Attachment 314707 [details] pushed as e4572a7 - Declare a SOUP_VAR to externalize variables
At this point we are just missing the deprecation patch that we need for figure out a good way to fix the unit tests.
Created attachment 316049 [details] [review] Mark old session-(async|sync) methods as deprecated They were not marked as deprecated yet to give people time to port over without getting annoying warnings. Now that we are at the start of a cycle let's mark them. Fix all the consequent deprecation warnings. ====== Is this OK for you?
Review of attachment 316049 [details] [review]: The patch seems fine for me.
We will need to test that inline trick in VS, but it should be ok. What about undefining IS_(A)SYNC_SESSION and redefining it to the undeprecated version only in a private header or only if a special "inside libsoup" flag is defined? This way library users would still get the deprecation warning.
(In reply to Paolo Borelli from comment #49) > What about undefining IS_(A)SYNC_SESSION and redefining it to the > undeprecated version only in a private header or only if a special "inside > libsoup" flag is defined? This way library users would still get the > deprecation warning. They'll always get a deprecation warning if they *create* a SoupSessionAsync or SoupSessionSync (since the _new and _get_type methods are all still marked deprecated). There is, possibly, a use case for deprecating the _IS_ macros too, but I think the convenience of not doing it outweighs that.
Attachment 316049 [details] pushed as 9aaa13a - Mark old session-(async|sync) methods as deprecated