~rotty/guile-gnome/glib

« back to all changes in this revision

Viewing changes to gnome/gw/glib-spec.scm

  • Committer: Andreas Rottmann
  • Date: 2005-09-17 10:33:40 UTC
  • mfrom: (unknown (missing))
  • Revision ID: Arch-1:guile-gnome-devel@gnu.org--2005%glib--dev--0--patch-8
Merged from rotty@debian.org--guile-gnome-2005: GCC 4.0 fixes
Patches applied:

 * rotty@debian.org--guile-gnome-2005/glib--dev--0--patch-11
   Fixed GCC 4.0 warnings, tweaks

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;; guile-gnome
2
 
;; Copyright (C) 2003,2004 Andy Wingo <wingo at pobox dot com>
 
2
;; Copyright (C) 2003,2004-2005 Andy Wingo <wingo at pobox dot com>
3
3
 
4
4
;; This program is free software; you can redistribute it and/or    
5
5
;; modify it under the terms of the GNU General Public License as   
175
175
               (type type) (options options)
176
176
               (message "Missing glist-of options form.")))))
177
177
  (if (< (length options) 2)
178
 
      (raise
179
 
       (condition
180
 
        (&gw-bad-typespec
181
 
         (type type) (options options)
182
 
         (message "glist-of options form must have at least 2 options.")))))
 
178
      (raise-bad-typespec type options
 
179
                          "glist-of options form must have at least 2 options."))
183
180
  (let ((sub-typespec (car options))
184
181
        (glist-options (cdr options))
185
182
        (remainder (cdr options)))
186
183
    
187
184
    (if (not (is-a? sub-typespec <gw-typespec>))
188
 
        (raise (condition
189
 
                (&gw-bad-typespec
190
 
                 (type type) (options options)
191
 
                 (message "glist-of options form must have a sub-typespec as first option.")))))
192
 
 
 
185
        (raise-bad-typespec
 
186
         type options
 
187
         "glist-of options form must have a sub-typespec as first option."))
193
188
    
194
189
    (set! remainder (delq 'const remainder))
195
190
    (if (and (memq 'caller-owned remainder)
196
191
             (memq 'callee-owned remainder))
197
 
        (raise (condition
198
 
                (&gw-bad-typespec
199
 
                 (type type) (options options)
200
 
                 (message
201
 
                  "Bad glist-of options form (caller and callee owned!).")))))
 
192
        (raise-bad-typespec type options 
 
193
                  "Bad glist-of options form (caller and callee owned!)."))
202
194
    
203
195
    (if (not (or (memq 'caller-owned remainder)
204
196
                 (memq 'callee-owned remainder)))
205
 
        (raise
206
 
         (condition
207
 
          (&gw-bad-typespec
208
 
           (type type) (options options)
209
 
           (message
210
 
            "Bad glist-of options form (must be caller or callee owned!).")))))
 
197
        (raise-bad-typespec
 
198
         type options
 
199
         "Bad glist-of options form (must be caller or callee owned!)."))
211
200
    (set! remainder (delq 'caller-owned remainder))
212
201
    (set! remainder (delq 'callee-owned remainder))
213
202
    (if (null? remainder)
215
204
          #:type type
216
205
          #:sub-typespec sub-typespec
217
206
          #:options glist-options)
218
 
        (raise (condition
219
 
                (&gw-bad-typespec
220
 
                 (type type) (options options)
221
 
                 (message
222
 
                  (format #f "Bad glist-of options form - spurious options: ~S"
223
 
                          remainder))))))))
 
207
        (raise-bad-typespec
 
208
         type options
 
209
         (format #f "Bad glist-of options form - spurious options: ~S"
 
210
                 remainder)))))
224
211
 
225
212
(define-method (unwrap-value-cg (glist-type <glist-of-type>)
226
213
                                (value <gw-value>)