guile-user
[Top][All Lists]
Advanced

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

Re: guile 1.4->1.6 migration hints, questions


From: Christopher Cramer
Subject: Re: guile 1.4->1.6 migration hints, questions
Date: Wed, 19 Feb 2003 14:54:51 -0600
User-agent: Mutt/1.2.5i

On Tue, Feb 18, 2003 at 11:59:57PM -0500, Steve Tell wrote:
> I don't suppose any repository of hints and recipies ever came of that
> discussion?  

I have a header that I'm using in guile-ncurses:

#ifndef PRE_1_6_H
#define PRE_1_6_H

#if SCM_MAJOR_VERSION < 1 || (SCM_MAJOR_VESION == 1 && SCM_MINOR_VERSION < 5)
#define SCM_MAKE_CHAR SCM_MAKICHR
#define SCM_ICHRP SCM_CHARP
#define SCM_CHAR SCM_ICHR
#define scm_list_n scm_listify
#define scm_c_define_gsubr scm_make_gsubr
#define scm_str2symbol(x) SCM_CAR(scm_intern((x), strlen(x)))
#define scm_c_define scm_sysintern
#endif

#endif /* PRE_1_6_H */

and one Scheme procedure:

(define load-extension
    (let (
            (major (string->number (major-version)))
            (minor (string->number (minor-version))))
        (if (or (< major 1) (and (= major 1) (< minor 5)))
            (lambda (so init)
                (dynamic-call init (dynamic-link so)))
            load-extension)))

I did these two by just looking at the diffs that resulted when I converted
to 1.6. They haven't been thoroughly tested yet.

-- 
Christopher Cramer <address@hidden> <http://www.pyro.net/~crayc/>
"All you have to do is tell them they are being attacked and denounce the
pacifists for lack of patriotism and exposing the country to danger. It
works the same way in any country." - Hermann Georing, 1946




reply via email to

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