Re: G-Wrap 1.9.9 released

schemer <[email protected]>
Newsgroups gmane.comp.programming.g-wrap.devel,gmane.lisp.guile.gtk
Message-ID <[email protected]>
Hello Rotty

I just noticed that you have added the following code in file
compat.scm in version 1.9.9.

;; Hack to make WCTs nullable (null-ok) by default, as in G-Wrap 1.3.4
(define-method (make-typespec (type <gw-wct>) (options <list>))
  (next-method type (if (memq 'non-null options)
                        (cons 'caller-owned (delq 'non-null options))
                        (append '(null-ok caller-owned) options))))

It seems the module (g-wrap compat) gets loaded irrespective of
whether you want to have version 1.3.4 compatibility or not. As a
result it becomes impossinble to define non-nullable wct's.

My application for example crashes when a null(#f) is given as an
argument to some wrapped functions. For now I have solved the problem
by hacking the g-wrap installed at my site and commenting out the
above quoted code. Is there a cleaner way for me to handle such a
situation.

To make it clear I will summaries -- My application crashes when a
NULL(#f) argument is given to some functions. I want the applcation to
give an "wrong type arg" error message instead. With the code added in
the latest version compat.scm, it does not seem possible as "null-ok"
is getting added to all wct arguments by default.

Regards
Puneet
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.