No subject
Mon Jul 9 10:09:07 PDT 2012
NULL).
For the internal documentations (placed in cpp files and tagged with
@internal) we should keep 0.
Regards,
Grzegorz
From: webkit-efl-bounces at lists.webkit.org
[mailto:webkit-efl-bounces at lists.webkit.org] On Behalf Of Dumez, Christophe
Sent: 16 July 2012 08:26
To: webkit-efl at lists.webkit.org
Subject: [webkit-efl] Using 0 or NULL in public C headers documentation ?
Hi,
At the moment, we using not consistent in the usage of NULL or 0 in the
documentation of our public C headers.
The best practice is not currently documented by:
http://trac.webkit.org/wiki/EFLWebKitCodingStyle
However, Gyuyoung is telling me there is an "unspoken" rule for WebKit-EFL
port that we should use 0.
I personally disagree and I think we should *always* use NULL in our public
C headers.
While 0 is advised for null pointers in C++, it is not for C
(http://lwn.net/Articles/93574/).
If you look at the EVAS documentation, it is also using NULL in its
documentation, not 0.
What do other WebKit EFL developers think?
We need to agree first, then document it on the coding style page and patch
the code accordingly.
For example,
/**
* Gets the Ewk_Settings of this view.
*
* @param o the view object to get Ewk_Settings
*
* @return the Ewk_Settings of this view or @c NULL on failure
*/
EAPI Ewk_Settings *ewk_view_settings_get(const Evas_Object *o);
Kr,
--
Christophe Dumez
Linux Software Engineer, PhD
Intel Finland Oy - Open Source Technology Center
------=_NextPart_000_0087_01CD6335.1562B7A0
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 12 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.from
{mso-style-name:from;}
span.text
{mso-style-name:text;}
span.to
{mso-style-name:to;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-GB link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Hi,<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>From my side it’s better to change the documentation of public =
headers (0 -> NULL).<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>For the internal documentations (placed in cpp files and tagged with =
@internal) we should keep 0.<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Regards,<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Grzegorz<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><div =
style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm'><p class=3DMsoNormal><b><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
webkit-efl-bounces at lists.webkit.org =
[mailto:webkit-efl-bounces at lists.webkit.org] <b>On Behalf Of </b>Dumez, =
Christophe<br><b>Sent:</b> 16 July 2012 08:26<br><b>To:</b> =
webkit-efl at lists.webkit.org<br><b>Subject:</b> [webkit-efl] Using 0 or =
NULL in public C headers documentation ?<o:p></o:p></span></p></div><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'>Hi,<br><br>At the moment, we using not =
consistent in the usage of NULL or 0 in the documentation of our public =
C headers.<br><br>The best practice is not currently documented =
by:<br><a =
href=3D"http://trac.webkit.org/wiki/EFLWebKitCodingStyle">http://trac.web=
kit.org/wiki/EFLWebKitCodingStyle</a><br><br>However, Gyuyoung is =
telling me there is an "unspoken" rule for WebKit-EFL port =
that we should use 0.<br>I personally disagree and I think we should =
*always* use NULL in our public C headers.<br><br>While 0 is advised for =
null pointers in C++, it is not for C (<a =
href=3D"http://lwn.net/Articles/93574/">http://lwn.net/Articles/93574/</a=
>).<br>If you look at the EVAS documentation, it is also using NULL in =
its documentation, not 0.<br><br>What do other WebKit EFL developers =
think?<br>We need to agree first, then document it on the coding style =
page and patch the code accordingly.<br><br>For =
example,<o:p></o:p></p><div id=3Dline325><p class=3DMsoNormal><span =
class=3Dtext><span style=3D'font-size:7.5pt;font-family:"Courier =
New";color:#666666'>/**</span></span> <o:p></o:p></p></div><div =
id=3Dline326><p class=3DMsoNormal><span =
style=3D'font-size:7.5pt;font-family:"Courier =
New";color:#666666'> <span class=3Dtext>* Gets the Ewk_Settings of =
this view.</span></span><span style=3D'font-family:"Courier =
New";color:#666666'> <o:p></o:p></span></p></div><div id=3Dline327><p =
class=3DMsoNormal><span style=3D'font-size:7.5pt;font-family:"Courier =
New";color:#666666'> <span class=3Dtext>*</span></span><span =
style=3D'font-family:"Courier New";color:#666666'> =
<o:p></o:p></span></p></div><div id=3Dline328><p class=3DMsoNormal><span =
style=3D'font-size:7.5pt;font-family:"Courier =
New";color:#666666'> <span class=3Dtext>* @param o the view object =
to get Ewk_Settings</span></span><span style=3D'font-family:"Courier =
New";color:#666666'> <o:p></o:p></span></p></div><div id=3Dline329><p =
class=3DMsoNormal><span style=3D'font-size:7.5pt;font-family:"Courier =
New";color:#666666'> <span class=3Dtext>*</span></span><span =
style=3D'font-family:"Courier New";color:#666666'> =
<o:p></o:p></span></p></div><div id=3Dline330><p class=3DMsoNormal><span =
style=3D'font-size:7.5pt;font-family:"Courier =
New";color:#666666'> <span class=3Dtext>* @return the Ewk_Settings =
of this view or @c <b>NULL</b> on failure</span></span><span =
style=3D'font-family:"Courier New";color:#666666'> =
<o:p></o:p></span></p></div><div id=3Dline331><p class=3DMsoNormal><span =
style=3D'font-size:7.5pt;font-family:"Courier =
New";color:#666666'> <span class=3Dtext>*/</span></span><span =
style=3D'font-family:"Courier New";color:#666666'> =
<o:p></o:p></span></p></div><div id=3Dline332><p class=3DMsoNormal><span =
style=3D'font-size:7.5pt;font-family:"Courier =
New";color:#666666'> <span class=3Dtext>EAPI Ewk_Settings =
*ewk_view_settings_get(const Evas_Object *o);</span></span><span =
style=3D'font-family:"Courier New";color:#666666'> =
<o:p></o:p></span></p></div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><br><br clear=3Dall>Kr,<br>-- =
<br>Christophe Dumez<br>Linux Software Engineer, PhD<br>Intel Finland Oy =
- Open Source Technology Center<o:p></o:p></p></div></body></html>
------=_NextPart_000_0087_01CD6335.1562B7A0--
More information about the webkit-efl
mailing list