summaryrefslogtreecommitdiff
blob: be54ee550ba7fb4b276b2f98c43b2a802987f13b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--- a/src/gtk-lib.hints
+++ b/src/gtk-lib.hints
@@ -527,8 +527,10 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));"
   (add-mixin! "Scm_GtkEditableClass" "Scm_GtkCellEditableClass"))
 
 ;; we can't free the return value of gtk_entry_get_text.
-(define-cproc gtk-entry-get-text (entry::<gtk-entry>)
-  "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_entry_get_text(entry)));")
+(define-cproc-fix gtk-entry-get-text
+  (fix-arguments! '(entry::<gtk-entry>))
+  (fix-body!
+   "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_entry_get_text(entry)));"))
 
 ;;==================================================================
 ;; gtkfilesel.h
@@ -539,8 +541,10 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));"
 ;; gtk_file_selection_get_filename returns mbstr encoded by the current
 ;; locale.  We canonicalize it to utf8.  The Scheme glue code converts
 ;; it to Gauche's internal encoding.
-(define-cproc gtk-file-selection-get-filename (sel::<gtk-file-selection>)
-  "const gchar *fn_mb = gtk_file_selection_get_filename(sel);
+(define-cproc-fix gtk-file-selection-get-filename
+  (fix-arguments! '(sel::<gtk-file-selection>))
+  (fix-body!
+   "const gchar *fn_mb = gtk_file_selection_get_filename(sel);
   gchar *fn_utf8 = g_filename_to_utf8(fn_mb, -1, NULL, NULL, NULL);
   if (fn_utf8 == NULL) {
     Scm_Error(\"got a filename including multibyte chars which can't be converted to UTF8: %s\", fn_mb);
@@ -549,7 +553,7 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));"
   SCM_RETURN(SCM_MAKE_STR_COPYING(fn_utf8));
 #else
   SCM_RETURN(Scm_MakeString(fn_utf8, -1, -1, SCM_MAKSTR_COPYING|SCM_MAKSTR_INCOMPLETE));
-#endif")
+#endif"))
 
 (define-cproc gtk-file-selection-get-selections (sel::<gtk-file-selection>)
   "gchar **fns_mb = gtk_file_selection_get_selections(sel);
@@ -609,10 +613,14 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));"
 (input-file "gtklabel.h")
 
 ;; Memory is owned by the widget so we don't need to free them.
-(define-cproc gtk-label-get-text (label::<gtk-label>)
-  "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_text(label)));")
-(define-cproc gtk-label-get-label (label::<gtk-label>)
-  "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_label(label)));")
+(define-cproc-fix gtk-label-get-text
+  (fix-arguments! '(label::<gtk-label>))
+  (fix-body!
+   "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_text(label)));"))
+(define-cproc-fix gtk-label-get-label
+  (fix-arguments! '(label::<gtk-label>))
+  (fix-body!
+   "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_label(label)));"))
 
 (define-cproc-fix gtk-label-get-seleciton-bounds
   (fix-arguments! '(label::<gtk-label>))
@@ -1121,9 +1129,11 @@ return SCM_MAKE_STR_COPYING((char*)string);"))
 
 (input-file "gtkprogressbar.h")
 
-(define-cproc gtk-progress-bar-get-text (pbar::<gtk-progress-bar>)
-  "gchar *g = gtk_progress_bar_get_text(pbar);
-  SCM_RETURN(SCM_MAKE_STR_COPYING_SAFELY(g));")
+(define-cproc-fix gtk-progress-bar-get-text
+  (fix-arguments! '(pbar::<gtk-progress-bar>))
+  (fix-body!
+   "gchar *g = gtk_progress_bar_get_text(pbar);
+  SCM_RETURN(SCM_MAKE_STR_COPYING_SAFELY(g));"))
 
 ;;==================================================================
 ;; gtkradiobutton