1 |
hattya 11/11/27 08:05:49 |
2 |
|
3 |
Added: gauche-gtk-gtk-lib.hints.diff |
4 |
gauche-gtk-h2s-gdk-pixbuf.diff |
5 |
gauche-gtk-h2s-cpp.diff |
6 |
Log: |
7 |
new upstream snapshot. fixes bug #239821. |
8 |
|
9 |
(Portage version: 2.1.10.11/cvs/Linux i686) |
10 |
|
11 |
Revision Changes Path |
12 |
1.1 dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff?rev=1.1&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff?rev=1.1&content-type=text/plain |
16 |
|
17 |
Index: gauche-gtk-gtk-lib.hints.diff |
18 |
=================================================================== |
19 |
--- a/src/gtk-lib.hints |
20 |
+++ b/src/gtk-lib.hints |
21 |
@@ -527,8 +527,10 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));" |
22 |
(add-mixin! "Scm_GtkEditableClass" "Scm_GtkCellEditableClass")) |
23 |
|
24 |
;; we can't free the return value of gtk_entry_get_text. |
25 |
-(define-cproc gtk-entry-get-text (entry::<gtk-entry>) |
26 |
- "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_entry_get_text(entry)));") |
27 |
+(define-cproc-fix gtk-entry-get-text |
28 |
+ (fix-arguments! '(entry::<gtk-entry>)) |
29 |
+ (fix-body! |
30 |
+ "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_entry_get_text(entry)));")) |
31 |
|
32 |
;;================================================================== |
33 |
;; gtkfilesel.h |
34 |
@@ -539,8 +541,10 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));" |
35 |
;; gtk_file_selection_get_filename returns mbstr encoded by the current |
36 |
;; locale. We canonicalize it to utf8. The Scheme glue code converts |
37 |
;; it to Gauche's internal encoding. |
38 |
-(define-cproc gtk-file-selection-get-filename (sel::<gtk-file-selection>) |
39 |
- "const gchar *fn_mb = gtk_file_selection_get_filename(sel); |
40 |
+(define-cproc-fix gtk-file-selection-get-filename |
41 |
+ (fix-arguments! '(sel::<gtk-file-selection>)) |
42 |
+ (fix-body! |
43 |
+ "const gchar *fn_mb = gtk_file_selection_get_filename(sel); |
44 |
gchar *fn_utf8 = g_filename_to_utf8(fn_mb, -1, NULL, NULL, NULL); |
45 |
if (fn_utf8 == NULL) { |
46 |
Scm_Error(\"got a filename including multibyte chars which can't be converted to UTF8: %s\", fn_mb); |
47 |
@@ -549,7 +553,7 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));" |
48 |
SCM_RETURN(SCM_MAKE_STR_COPYING(fn_utf8)); |
49 |
#else |
50 |
SCM_RETURN(Scm_MakeString(fn_utf8, -1, -1, SCM_MAKSTR_COPYING|SCM_MAKSTR_INCOMPLETE)); |
51 |
-#endif") |
52 |
+#endif")) |
53 |
|
54 |
(define-cproc gtk-file-selection-get-selections (sel::<gtk-file-selection>) |
55 |
"gchar **fns_mb = gtk_file_selection_get_selections(sel); |
56 |
@@ -609,10 +613,14 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));" |
57 |
(input-file "gtklabel.h") |
58 |
|
59 |
;; Memory is owned by the widget so we don't need to free them. |
60 |
-(define-cproc gtk-label-get-text (label::<gtk-label>) |
61 |
- "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_text(label)));") |
62 |
-(define-cproc gtk-label-get-label (label::<gtk-label>) |
63 |
- "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_label(label)));") |
64 |
+(define-cproc-fix gtk-label-get-text |
65 |
+ (fix-arguments! '(label::<gtk-label>)) |
66 |
+ (fix-body! |
67 |
+ "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_text(label)));")) |
68 |
+(define-cproc-fix gtk-label-get-label |
69 |
+ (fix-arguments! '(label::<gtk-label>)) |
70 |
+ (fix-body! |
71 |
+ "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_label(label)));")) |
72 |
|
73 |
(define-cproc-fix gtk-label-get-seleciton-bounds |
74 |
(fix-arguments! '(label::<gtk-label>)) |
75 |
@@ -1121,9 +1129,11 @@ return SCM_MAKE_STR_COPYING((char*)string);")) |
76 |
|
77 |
(input-file "gtkprogressbar.h") |
78 |
|
79 |
-(define-cproc gtk-progress-bar-get-text (pbar::<gtk-progress-bar>) |
80 |
- "gchar *g = gtk_progress_bar_get_text(pbar); |
81 |
- SCM_RETURN(SCM_MAKE_STR_COPYING_SAFELY(g));") |
82 |
+(define-cproc-fix gtk-progress-bar-get-text |
83 |
+ (fix-arguments! '(pbar::<gtk-progress-bar>)) |
84 |
+ (fix-body! |
85 |
+ "gchar *g = gtk_progress_bar_get_text(pbar); |
86 |
+ SCM_RETURN(SCM_MAKE_STR_COPYING_SAFELY(g));")) |
87 |
|
88 |
;;================================================================== |
89 |
;; gtkradiobutton |
90 |
|
91 |
|
92 |
|
93 |
1.1 dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff |
94 |
|
95 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff?rev=1.1&view=markup |
96 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff?rev=1.1&content-type=text/plain |
97 |
|
98 |
Index: gauche-gtk-h2s-gdk-pixbuf.diff |
99 |
=================================================================== |
100 |
--- a/src/h2s-gtk.scm |
101 |
+++ b/src/h2s-gtk.scm |
102 |
@@ -50,6 +50,11 @@ |
103 |
(define pango-directory |
104 |
(find-header-dir #`"pango-,|pango-version|/pango/pango.h" |
105 |
*header-search-paths*)) |
106 |
+(define gdk-pixbuf-directory |
107 |
+ (guard (e [(<error> e) |
108 |
+ gtk-directory]) |
109 |
+ (find-header-dir #`"gdk-pixbuf-,|gtk-version|/gdk-pixbuf/gdk-pixbuf.h" |
110 |
+ *header-search-paths* ))) |
111 |
|
112 |
|
113 |
(define (parse-gdk) |
114 |
@@ -64,7 +69,7 @@ |
115 |
(call-with-input-file "PANGOFILES" port->string-list))) |
116 |
|
117 |
(define (parse-gdk-pixbuf) |
118 |
- (parse-headers #`",|gtk-directory|/gdk-pixbuf" |
119 |
+ (parse-headers #`",|gdk-pixbuf-directory|/gdk-pixbuf" |
120 |
(call-with-input-file "GDKPIXBUFFILES" port->string-list))) |
121 |
|
122 |
;; defaults for the gauche-gtk package: |
123 |
|
124 |
|
125 |
|
126 |
1.1 dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff |
127 |
|
128 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff?rev=1.1&view=markup |
129 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff?rev=1.1&content-type=text/plain |
130 |
|
131 |
Index: gauche-gtk-h2s-cpp.diff |
132 |
=================================================================== |
133 |
--- a/lib/h2s/parse.scm |
134 |
+++ b/lib/h2s/parse.scm |
135 |
@@ -329,6 +329,8 @@ |
136 |
(#/^\}\s*([\w_]+)/ (#f name) (make-enum name (reverse enums))) ; -----> |
137 |
;; empty line: |
138 |
(#/^\s*$/ () (loop (read-line) enums)) |
139 |
+ ;; preprocessor directive: |
140 |
+ (#/^\s*#\s*\w+/ () (loop (read-line) enums)) |
141 |
;; |
142 |
(test has-comment? (skip-comment line (cut loop <> enums) err-eof)) ; what if?: new_value, /* boring comment*/ |
143 |
(#/\s+([\w_]+),?/ (#f enum) |