[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: g-wrap <gw-guile-wct> questions
From: |
Andy Wingo |
Subject: |
Re: g-wrap <gw-guile-wct> questions |
Date: |
Mon, 16 Aug 2004 21:26:04 +0100 |
User-agent: |
Mutt/1.5.6+20040803i |
Hey Steve,
On Mon, 16 Aug 2004, Steve Tell wrote:
> (define-method (wrap-value-cg (wct <gw:parport*>)
> (value <gw-value>)
> status-var)
> (let ((wct-var (slot-ref wct 'wct-var-name))
> (sv (scm-var value))
> (cv (var value)))
> (list
> "if(" cv " == NULL) scm_syserror_msg(\"wrap(gw:parport*)\", \"error
> ~a\", SCM_EOL, errno);\n"
> "else " sv " = gw_wcp_assimilate_ptr((void *) " cv ", " wct-var
> ");\n")))
>
>
> (I'm doing the call to scm_syserror_msg wrong somehow;
Yeah, you should be using gw:error. It's a bizarre construct, e.g.
`(gw:error ,status-var type ,(wrapped-var value))
First the gw:error symbol, then the name of the status var, then a
symbol indicating which kind of error, then type-specific args:
;; (list 'gw:error status-var 'misc msg format-args)
;; (list 'gw:error status-var 'memory)
;; (list 'gw:error status-var 'range scm-item-out-of-range)
;; (list 'gw:error status-var 'type scm-bad-type-item)
;; (list 'gw:error status-var 'argc)
Cheers,
--
Andy Wingo <address@hidden>
http://ambient.2y.net/wingo/
- g-wrap? libffi?, Steve Tell, 2004/08/03
- Re: g-wrap? libffi?, Andreas Rottmann, 2004/08/03
- Re: g-wrap? libffi?, Steve Tell, 2004/08/03
- Re: g-wrap? libffi?, Andreas Rottmann, 2004/08/04
- g-wrap <gw-guile-wct> questions, Steve Tell, 2004/08/12
- Re: g-wrap <gw-guile-wct> questions, Andy Wingo, 2004/08/15
- Re: g-wrap <gw-guile-wct> questions, Steve Tell, 2004/08/16
- Re: g-wrap <gw-guile-wct> questions,
Andy Wingo <=
- Re: g-wrap <gw-guile-wct> questions, Steve Tell, 2004/08/27
- Re: g-wrap <gw-guile-wct> questions, Andreas Rottmann, 2004/08/18