[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCM_BOOL_T became #nil -- et al. ?

From: Bruce Korb
Subject: Re: SCM_BOOL_T became #nil -- et al. ?
Date: Wed, 23 Feb 2011 12:14:12 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11

On 02/22/11 20:15, Ken Raeburn wrote:
> On Feb 22, 2011, at 07:00, Hans Aberg wrote:
>>>> Perhaps 2.0 should have some check that it gets the right header.
> It wouldn't be that tough to do something like:
>   #define scm_init_guile  scm_init_guile_v2_0 // encode version in symbol
> and tell people to use the macro.  Ugly, maybe, but not tough. :-)
>> If you use `guile-config compile` (and `guile-config link`)
>> in your Makefile it will come out right.
> Unless you're also using some other "foo-config" script.....

Fail early and fail hard.  Please find a way to fail a test
program, once "configure" has arranged the -I list.


* guile should provide autoconf macros to do checking,
  like for wrong version headers.
* Developers should be clearly warned that -I/usr/local/include
  needs to be after all other -I options, due to guile
  header naming conflicts.
* I have to vary various interfaces because of the
  obsolescence that happens from release to release.
  Consistency would be really nice:

    There should be a macro that has the value 0x200000 or
    some such that includes the revision number, too.
    "scm_init_guile_with_version_check" would just ignore
    the last 12 bits (or divide by 1000, whatever works...)

  I have to if-def code due to the interface migration.
  BSD has moved on to 1.6, so I expect they won't be going
  to 2.0 any time soon.

Speaking of moving interfaces, since this call:
yields a value that gets garbage collected and since it is
equivalent to the accidentally removed scm_listofnull,
I am interested in a stable "do it this way" equivalent.

>> > By replacing "scm_listofnull" with "ag_scm_listofnull" and initializing it:
>> >    SCM ag_scm_listofnull =  scm_list_1 (SCM_EOL);
> In Guile < 1.9.3, you have to scm_gc_protect_object this value
> (info "(guile) Garbage Collection Functions").

and it sounds like scm_gc_protect_object(ag_scm_listofnull) won't
work in 2.0.  Would you-all please put scm_listofnull back?
Thank you.  Regards, Bruce

P.S. the listofnull piece of my guile interface glue now looks like this:

> #if   GUILE_VERSION < 107000
> [.....]
> # define AG_SCM_LISTOFNULL()          scm_listofnull
> #elif GUILE_VERSION < 108000
> [.....]
> # define AG_SCM_LISTOFNULL()          scm_listofnull
> #elif GUILE_VERSION < 109000
> [.....]
> # define AG_SCM_LISTOFNULL()          scm_listofnull
> #elif GUILE_VERSION < 201000
> [.....]
> # define AG_SCM_LISTOFNULL()          scm_list_1(SCM_EOL)
> # define scm_sizet                    size_t
> #else
> #error unknown GUILE_VERSION
> #endif

and I use AG_SCM_LISTOFNULL() instead of scm_listofnull.
Does this look right?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]