In revision 922, I commited #f check for getter of define-record. It was reverted in revison 929, but IMHO this is need. As an example, exec following code. With revision 922, "end e" would not be printed. == start of a.scm ================================ (require "im.scm") (define (a) (print "start a") (print (im-lang #f)) (print "end e")) (a) == end of a.scm =================================
uim> (a) "start a" ERROR: bad arg to nth (see errobj) r929 results as above. The message "ERROR: bad arg to nth" and subsequent termination of execution is the error check what I mensioned in the commit message of r929. Continuation without such termination as performed in r922 does not make sense. What we should do is removing (im-lang #f) condition.
IMHO following code should generate following result. "start a" "FAILED" "end e" But revision 929 doesn't. It's not comfortable for me. == start of a2.scm ==================================== (require "im.scm") (define (a) (print "start a") (if (im-lang #f) (print "OK") (print "FAILED")) (print "end e")) (a) == end of a2.scm ======================================
im-lang expects an im record as argument. So (im-lang #f) is completely invalid form. Suppose ((im *)NULL)->lang in C. I can't imagine when (im-lang #f) will happen. Please show me actual example.
As an actual example, exec current uim-module-manager. (Note, you should make back up of your loader.scm and installed-module.scm at first, it's not work fine at this point.) It works with util.scm rev922, but doesn't with 929. I don't want to debug, because I don't have enough time and morale.
I decline the change since your code of r922 has a design error. See following example. (define-record 'foo '((initialized? #f))) (define rec (foo-new)) (foo-initialized? rec) ==> #f (foo-initialized? #f) ==> #f The two results can't be distinguished by its caller. Although latter form outputs error message for human, the caller code can't detect it. To avoid this ambiguity, explicit #f check preceding foo-initialized? is required as follows. (if rec (foo-initialized? rec) (error-handlings)) I decline the design error and you should repair your own code as above. I'll debug my codes when you found something wrong other than yours.
This problem is already fixed by the rewrite around uim-module-manager.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.