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 679228 - signal parameter names are not valid C identifiers
signal parameter names are not valid C identifiers
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
3.5.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-07-01 18:23 UTC by Phil Clayton
Modified: 2012-07-11 11:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Change signal parameter names in GdkWindow to be valid C identifiers (2.12 KB, patch)
2012-07-02 01:37 UTC, Phil Clayton
accepted-commit_now Details | Review
Change signal parameter names in GdkWindow to be valid C identifiers (2.12 KB, patch)
2012-07-11 11:23 UTC, Matthias Clasen
committed Details | Review

Description Phil Clayton 2012-07-01 18:23:10 UTC
Signal parameter names in introspection annotations aren't forced to be valid C identifiers because there is no corresponding C function in the source code.   

GdkWindow::from-embedder and GdkWindow::to-embedder use parameter names
  embedder-x
  embedder-y
  offscreen-x
  offscreen-y

Consequently, signal handler C function prototypes in reference documentation are not valid C, e.g.

  void user_function (GdkWindow *window,
                      gdouble    offscreen-x,
                      gdouble    offscreen-y,
                      gpointer   embedder-x,
                      gpointer   embedder-y,
                      gpointer   user_data) : Run Last

Discussion on #introspection has established that signal parameter names should be valid C identifiers:

<dieterv> pclayton: GTK-Doc has this to say about singal parameter names:
<dieterv> # allow alphanumerics, '_', '[' & ']' in param names
<dieterv> if ($params[$j] =~ m/^\s*(\w+)\s*(\**)\s*([\w\[\]]+)\s*$/) {
<dieterv> so yeah, looks like they should be valic C identifiers
<dieterv> ... it happens in GetSignals, http://git.gnome.org/browse/gtk-doc/tree/gtkdoc-mkdb.in#n3399
Comment 1 Phil Clayton 2012-07-02 01:37:42 UTC
Created attachment 217793 [details] [review]
Change signal parameter names in GdkWindow to be valid C identifiers
Comment 2 Emmanuele Bassi (:ebassi) 2012-07-02 09:50:56 UTC
Review of attachment 217793 [details] [review]:

looks okay to me
Comment 3 Matthias Clasen 2012-07-03 00:01:42 UTC
Review of attachment 217793 [details] [review]:

fine with me too
Comment 4 Matthias Clasen 2012-07-11 11:23:41 UTC
The following fix has been pushed:
bd3e397 Change signal parameter names in GdkWindow to be valid C identifiers
Comment 5 Matthias Clasen 2012-07-11 11:23:44 UTC
Created attachment 218535 [details] [review]
Change signal parameter names in GdkWindow to be valid C identifiers