WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 69506
[GTK] Do not use C API in GTK+ API public headers
https://bugs.webkit.org/show_bug.cgi?id=69506
Summary
[GTK] Do not use C API in GTK+ API public headers
Carlos Garcia Campos
Reported
2011-10-06 01:02:34 PDT
We only use WK_EXPORT macro, but if the C API is eventually removed we will have to change all public headers, so I think it's better to just add our own macro like WebKit1 does
Attachments
Patch
(9.33 KB, patch)
2011-10-06 01:05 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Updated patch to ignore WEBKIT_API in docs
(10.10 KB, patch)
2011-10-06 08:56 PDT
,
Carlos Garcia Campos
mrobinson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2011-10-06 01:05:55 PDT
Created
attachment 109932
[details]
Patch
Martin Robinson
Comment 2
2011-10-06 07:59:59 PDT
Comment on
attachment 109932
[details]
Patch At this point I think it's best to avoid the code duplication. Even if the C API disappears it will be a while from now and we have time to fix the headers.
Carlos Garcia Campos
Comment 3
2011-10-06 08:02:47 PDT
We are wrapping the C API, it shouldn't be exposed from the GTK+ API.
Carlos Garcia Campos
Comment 4
2011-10-06 08:56:15 PDT
Created
attachment 109964
[details]
Updated patch to ignore WEBKIT_API in docs I still think we shoulnd't expose the C API at all in the public headers. The fact that we are wrapping the C API is just an implementation detail. We might decide not to distribute the C API in the future and use it a private library.
Martin Robinson
Comment 5
2011-10-06 09:17:53 PDT
Comment on
attachment 109932
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=109932&action=review
Okay...I think I'm convinced.
> Source/WebKit2/UIProcess/API/gtk/WebKitDefines.h:45 > +#include <glib.h> > + > +#ifdef G_OS_WIN32 > +# ifdef BUILDING_WEBKIT > +# define WEBKIT_API __declspec(dllexport) > +# else > +# define WEBKIT_API __declspec(dllimport) > +# endif > +# define WEBKIT_OBSOLETE_API WEBKIT_API > +#else > +# define WEBKIT_API __attribute__((visibility("default"))) > +# define WEBKIT_OBSOLETE_API WEBKIT_API __attribute__((deprecated)) > +#endif
You should not indent preprocessor defines.
Martin Robinson
Comment 6
2011-10-06 09:20:35 PDT
Comment on
attachment 109964
[details]
Updated patch to ignore WEBKIT_API in docs View in context:
https://bugs.webkit.org/attachment.cgi?id=109964&action=review
> Source/WebKit2/UIProcess/API/gtk/WebKitError.h:28 > #include <glib.h>
You can remove this glib.h include now.
> Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h:27 > #include <glib-object.h>
Ditto, I think.
> Source/WebKit2/UIProcess/API/gtk/WebKitWebLoaderClient.h:27 > #include <glib-object.h>
Etc.
Carlos Garcia Campos
Comment 7
2011-10-06 09:56:36 PDT
Committed
r96821
: <
http://trac.webkit.org/changeset/96821
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug