[webkit-efl] Using 0 or NULL in public C headers documentation ?
Dumez, Christophe
christophe.dumez at intel.com
Sun Jul 15 23:44:31 PDT 2012
Right, if people agree on using NULL in public C/EFL headers, I can write
the patch to fix all WK1/WK2 EFL headers at once.
We need to be consistent either way and currently, we are not.
Kr,
On Mon, Jul 16, 2012 at 9:40 AM, Gyuyoung Kim <gyuyoung.kim at samsung.com>wrote:
> Hi,
>
> As you may know, there is a little document in WebKit. So, it looks EFL
> port has one of best documentation among other ports.
> In my opinion, we decide to follow EFL coding style for public APIs
> because those are used by EFL application. If NULL is C style and EFL style,
> I think we can use NULL instead of 0. But, if specific bus only start to
> use it, I think this can make confusion in other bug. So, if we decide to
> use NULL for API documentation, I think it is better to change this at
> once.
>
> Gyuyoung.
>
> ------- Original Message -------
> Sender : Dumez, Christophe<christophe.dumez at intel.com>
> Date : 2012-07-16 15:25 (GMT+09:00)
> Title : 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
> _______________________________________________
> webkit-efl mailing list
> webkit-efl at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-efl
>
--
Christophe Dumez
Linux Software Engineer, PhD
Intel Finland Oy - Open Source Technology Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-efl/attachments/20120716/852fb812/attachment-0001.html>
More information about the webkit-efl
mailing list