]> git.pld-linux.org Git - packages/ruby-gnome2.git/blob - parse-error.patch
fix parse error with NIL_P used without parenthesis
[packages/ruby-gnome2.git] / parse-error.patch
1 fix compiler (gcc 4.8) errors for ruby-gnome2:
2
3 rbgtkcalendar.c: In function 'rg_display_options':
4 /usr/include/ruby-2.0/ruby/ruby.h:446:18: error: expected '(' before '!' token
5  #define NIL_P(v) !((VALUE)(v) != Qnil)
6
7 seems same error as here:
8 https://github.com/shoes/shoes/issues/246
9 --- ruby-gnome2-all-1.1.9/gtk2/ext/gtk2/rbgtkcalendar.c~        2012-01-05 13:23:51.000000000 +0200
10 +++ ruby-gnome2-all-1.1.9/gtk2/ext/gtk2/rbgtkcalendar.c 2014-07-26 22:30:31.050939929 +0300
11 @@ -105,7 +105,7 @@
12      VALUE flags;
13      rb_scan_args(argc, argv, "01", &flags);
14  
15 -    if NIL_P(flags){
16 +    if (NIL_P(flags)){
17  #if GTK_CHECK_VERSION(2,4,0)
18          return GFLAGS2RVAL(gtk_calendar_get_display_options(_SELF(self)),
19                             GTK_TYPE_CALENDAR_DISPLAY_OPTIONS);
20 --- ruby-gnome2-all-1.1.9/gtk2/ext/gtk2/rbgdkscreen.c~  2012-01-05 13:23:51.000000000 +0200
21 +++ ruby-gnome2-all-1.1.9/gtk2/ext/gtk2/rbgdkscreen.c   2014-07-26 22:30:54.818646494 +0300
22 @@ -210,7 +210,7 @@
23      VALUE value;
24  
25      rb_scan_args(argc, argv, "11", &name, &type);
26 -    if NIL_P(type) 
27 +    if (NIL_P(type))
28          gtype = G_TYPE_STRING;
29      else
30          gtype = CLASS2GTYPE(type);
31 --- ruby-gnome2-all-1.1.9/gtk2/ext/gtk2/rbgdkevent.c~   2012-01-05 13:23:51.000000000 +0200
32 +++ ruby-gnome2-all-1.1.9/gtk2/ext/gtk2/rbgdkevent.c    2014-07-26 22:31:06.012469585 +0300
33 @@ -387,7 +387,7 @@
34      VALUE value;
35  
36      rb_scan_args(argc, argv, "11", &name, &type);
37 -    if NIL_P(type) 
38 +    if (NIL_P(type))
39          gtype = G_TYPE_STRING;
40      else
41          gtype = CLASS2GTYPE(type);
42 --- ruby-gnome2-all-1.1.9/gdk3/ext/gdk3/rbgdkscreen.c~  2012-01-05 13:23:51.000000000 +0200
43 +++ ruby-gnome2-all-1.1.9/gdk3/ext/gdk3/rbgdkscreen.c   2014-07-26 22:31:15.812898377 +0300
44 @@ -214,7 +214,7 @@
45      VALUE value;
46  
47      rb_scan_args(argc, argv, "11", &name, &type);
48 -    if NIL_P(type) 
49 +    if (NIL_P(type))
50          gtype = G_TYPE_STRING;
51      else
52          gtype = CLASS2GTYPE(type);
53 --- ruby-gnome2-all-1.1.9/gdk3/ext/gdk3/rbgdkevent.c~   2012-01-05 13:23:51.000000000 +0200
54 +++ ruby-gnome2-all-1.1.9/gdk3/ext/gdk3/rbgdkevent.c    2014-07-26 22:31:26.213353421 +0300
55 @@ -370,7 +370,7 @@
56      VALUE value;
57  
58      rb_scan_args(argc, argv, "11", &name, &type);
59 -    if NIL_P(type) 
60 +    if (NIL_P(type))
61          gtype = G_TYPE_STRING;
62      else
63          gtype = CLASS2GTYPE(type);
This page took 0.035211 seconds and 3 git commands to generate.