unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* gEDA now supports Guile 2.0! (And an issue).
@ 2011-06-04  0:26 Peter TB Brett
  2011-06-04  2:59 ` nalaginrut
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter TB Brett @ 2011-06-04  0:26 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

Hi folks,

I just finished porting gEDA (http://www.gpleda.org/) to Guile 2.0!

I encountered one problem, though.

In Guile 1.8.x, scm_display_error() takes a stack as the first
argument.  In Guile 2.0.x, scm_display_error() takes a frame as the
first argument.

Can anyone suggest a sensible way to support both? I haven't been able
to figure out a good feature test... at the moment I've had to resort to
passing #f. :-(

                      Peter

-- 
Peter Brett <peter@peter-b.co.uk>
Remote Sensing Research Group
Surrey Space Centre

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gEDA now supports Guile 2.0! (And an issue).
  2011-06-04  0:26 gEDA now supports Guile 2.0! (And an issue) Peter TB Brett
@ 2011-06-04  2:59 ` nalaginrut
  2011-06-04  8:42 ` Neil Jerram
  2012-01-08 15:38 ` Andy Wingo
  2 siblings, 0 replies; 4+ messages in thread
From: nalaginrut @ 2011-06-04  2:59 UTC (permalink / raw)
  To: Peter TB Brett; +Cc: guile-user

> Hi folks,
> 
> I just finished porting gEDA (http://www.gpleda.org/) to Guile 2.0!
> 
> I encountered one problem, though.
> 
> In Guile 1.8.x, scm_display_error() takes a stack as the first
> argument.  In Guile 2.0.x, scm_display_error() takes a frame as the
> first argument.
> 
> Can anyone suggest a sensible way to support both? I haven't been able
> to figure out a good feature test... at the moment I've had to resort to
> passing #f. :-(
> 
>                       Peter
> 

What about provide two interfaces and dispatch them by checking
scm_major_version?  Just suggestion. I'm not sure whether it's a proper
way.

-- 
GNU Powered it
GPL Protected it
GOD Blessed it

HFG - NalaGinrut

--hacker key--
v4sw7CUSMhw6ln6pr8OSFck4ma9u8MLSOFw3WDXGm7g/l8Li6e7t4TNGSb8AGORTDLMen6g6RASZOGCHPa28s1MIr4p-x hackerkey.com
---end key---




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gEDA now supports Guile 2.0! (And an issue).
  2011-06-04  0:26 gEDA now supports Guile 2.0! (And an issue) Peter TB Brett
  2011-06-04  2:59 ` nalaginrut
@ 2011-06-04  8:42 ` Neil Jerram
  2012-01-08 15:38 ` Andy Wingo
  2 siblings, 0 replies; 4+ messages in thread
From: Neil Jerram @ 2011-06-04  8:42 UTC (permalink / raw)
  To: Peter TB Brett; +Cc: guile-user

Peter TB Brett <peter@peter-b.co.uk> writes:

> Can anyone suggest a sensible way to support both? I haven't been able
> to figure out a good feature test... at the moment I've had to resort to
> passing #f. :-(

How about executing a fragment of Guile code that calls display-error,
and seeing if it throws an exception?

scheme@(guile-user)> (false-if-exception (begin (display-error (make-stack #t) (current-output-port) "a" "b" '() '()) #t))
$2 = #f
scheme@(guile-user)> (false-if-exception (begin (display-error (stack-ref (make-stack #t) 0) (current-output-port) "a" "b" '() '()) #t))
ERROR: In procedure make-stack:
ERROR: In procedure a: b
$3 = #t

    Neil



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gEDA now supports Guile 2.0! (And an issue).
  2011-06-04  0:26 gEDA now supports Guile 2.0! (And an issue) Peter TB Brett
  2011-06-04  2:59 ` nalaginrut
  2011-06-04  8:42 ` Neil Jerram
@ 2012-01-08 15:38 ` Andy Wingo
  2 siblings, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2012-01-08 15:38 UTC (permalink / raw)
  To: Peter TB Brett; +Cc: guile-user

Hi Peter,

Sorry for the terrible delay here.

On Sat 04 Jun 2011 02:26, Peter TB Brett <peter@peter-b.co.uk> writes:

> I just finished porting gEDA (http://www.gpleda.org/) to Guile 2.0!

Yay!

> In Guile 1.8.x, scm_display_error() takes a stack as the first
> argument.  In Guile 2.0.x, scm_display_error() takes a frame as the
> first argument.

I have re-added support for passing a stack as the first argument.  It
will produce a deprecation warning at runtime though.

> Can anyone suggest a sensible way to support both? I haven't been able
> to figure out a good feature test... at the moment I've had to resort to
> passing #f. :-(

You could manually check the (effective-version)... not so nice, but oh
well.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-08 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-04  0:26 gEDA now supports Guile 2.0! (And an issue) Peter TB Brett
2011-06-04  2:59 ` nalaginrut
2011-06-04  8:42 ` Neil Jerram
2012-01-08 15:38 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).