After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641780 - Incorrect C function names for URLable interface
Incorrect C function names for URLable interface
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: libfolks
0.3.x
Other Linux
: Normal critical
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-07 22:16 UTC by Philip Withnall
Modified: 2011-02-08 23:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Rename URLable to Urlable (2.23 KB, patch)
2011-02-07 22:47 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2011-02-07 22:16:18 UTC
The URLable interface generates the following C function declarations:

GList* folks_ur_lable_get_urls (FolksURLable* self);
void folks_ur_lable_set_urls (FolksURLable* self, GList* value);
Comment 1 Philip Withnall 2011-02-07 22:34:18 UTC
I can think of two options:
 • Rename URLable → Urlable.
 • Use some [CCode (cname = "…")] magic on the URLable interface or its methods to fix them.

I suspect the first option is the best; it's less fragile and makes the interface name more consistent with similar existing APIs (such as SexyUrlLabel, EUrl and CamelUrlScanner; but strangely not CamelURL).
Comment 2 Travis Reitter 2011-02-07 22:40:49 UTC
(In reply to comment #1)
> I can think of two options:
>  • Rename URLable → Urlable.

This option sounds the best to me as well. I'd like to keep the CCode decorators to a minimum (so the translation between the Vala and C API is as straightforward as possible).
Comment 4 Travis Reitter 2011-02-08 03:04:43 UTC
Review of attachment 180347 [details] [review]:

Looks good.
Comment 5 Travis Reitter 2011-02-08 23:46:17 UTC
Comment on attachment 180347 [details] [review]
Rename URLable to Urlable

Decided I needed this in place now, so I've merged it.

===========

commit 034ab81aee5219d70927c9c72b7405b4bf4863c3
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Mon Feb 7 22:45:35 2011 +0000

    Bug 641780 <E2><80><94> Incorrect C function names for URLable interface
    
    Rename the new URLable interface to Urlable, as Vala was choking on the
    capitalisation and producing weird C function names like
    folks_ur_lable_get_urls(). Closes: bgo#641780

 NEWS                  |    2 ++
 folks/individual.vala |    4 ++--
 folks/urlable.vala    |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)