[Webkit-unassigned] [Bug 67705] [EFL] Add missing *void* parameter

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 8 16:39:13 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=67705





--- Comment #5 from Lucas De Marchi <demarchi at webkit.org>  2011-09-08 16:39:13 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 106573 [details] [details])
> > void parameter is not a coding-style thing.
> > 
> > In C, a function with no parameters is achieved by putting a void keyword in the parameter's list. Without any keywords it's considered a function that can receive any number of parameters (the equivalent of writing (...)  in C++).
> > 
> > Although this is a valid function prototype in C++, it's not a the preferred way of doing it. Since these are all C++ files and header that is included only by C++ sources, there's no point in adding them at all.
> > 
> > See: http://en.wikipedia.org/wiki/Void_type
> > 
> > For the reasons pointed out above, my informal r-.
> 
> I understand what your point. However, as you know, real implementation of ewk is C, not C++. So, I don't know whether we should adhere C++ coding rule. Furthermore, almost existing implementations in ewk are using *void* parameter. In addition, it looks gtk port is also using void parameter.

But it's compiled by a C++ compiler.

> 
> 3448 GtkWidget* webkit_web_view_new(void)
> 3449 {
> 3450     WebKitWebView* webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW, NULL));
> 3451 
> 3452     return GTK_WIDGET(webView);
> 3453 }
> 
> How do you think ?

In public header we must put the void keyword, however private headers and sources should use C++ if they are C++ sources (btw, we don't have any .c file anymore)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list