Merge lp:~ted/libdbusmenu/double-underscore into lp:libdbusmenu/0.6

Proposed by Ted Gould on 2012-04-12
Status: Merged
Approved by: Charles Kerr on 2012-04-23
Approved revision: 407
Merged at revision: 416
Proposed branch: lp:~ted/libdbusmenu/double-underscore
Merge into: lp:libdbusmenu/0.6
Diff against target: 12 lines (+1/-1)
1 file modified
libdbusmenu-gtk/genericmenuitem.c (+1/-1)
To merge this branch: bzr merge lp:~ted/libdbusmenu/double-underscore
Reviewer Review Type Date Requested Status
Charles Kerr (community) 2012-04-12 Approve on 2012-04-23
Review via email: mp+101772@code.launchpad.net

Description of the change

Making the function static, and possibly inline.

To post a comment you must log in.
Charles Kerr (charlesk) wrote :

I don't think that G_INLINE_FUNC does what you're intending here.

> G_INLINE_FUNC
>
> This macro is used to export function prototypes so they can be linked with an external version when no
> inlining is performed. The file which implements the functions should define G_IMPLEMENTS_INLINES before
> including the headers which contain G_INLINE_FUNC declarations. Since inlining is very compiler-dependent
> using these macros correctly is very difficult. Their use is strongly discouraged.
>
> This macro is often mistaken for a replacement for the inline keyword; inline is already declared in a
> portable manner in the GLib headers and can be used normally.

review: Needs Fixing
Ted Gould (ted) wrote :

On Wed, 2012-04-18 at 12:26 +0000, Charles Kerr wrote:
> I don't think that G_INLINE_FUNC does what you're intending here.

Fixed r407

407. By Ted Gould on 2012-04-23

Static is probably better to ensure we don't get out of the binary

Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libdbusmenu-gtk/genericmenuitem.c'
--- libdbusmenu-gtk/genericmenuitem.c 2012-04-11 21:26:12 +0000
+++ libdbusmenu-gtk/genericmenuitem.c 2012-04-23 17:52:24 +0000
@@ -242,7 +242,7 @@
242}242}
243243
244/* Sanitize the label by removing "__" meaning "_" */244/* Sanitize the label by removing "__" meaning "_" */
245gchar *245static gchar *
246sanitize_label (const gchar * in_label)246sanitize_label (const gchar * in_label)
247{247{
248 static GRegex * underscore_regex = NULL;248 static GRegex * underscore_regex = NULL;

Subscribers

People subscribed via source and target branches

to all changes: