GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
guile-mappings.h
1 /********************************************************************\
2  * guile-mappings.h - Guile version compatibility mappings *
3  * Copyright (C) 2003, David Hampton *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, write to the Free Software *
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
18 \********************************************************************/
19 
20 #include <libguile.h> /* for SCM_MAJOR_VERSION etc */
21 
22 /* Give Guile 1.8 a 2.0-like interface */
23 #if (SCM_MAJOR_VERSION < 2)
24 # define scm_c_string_length scm_i_string_length
25 #endif
26 #ifndef scm_from_utf8_string
27 # define scm_from_utf8_string scm_from_locale_string
28 # define scm_to_utf8_string scm_to_locale_string
29 #endif
30 
31 /* Convenience macros */
32 
33 #define scm_is_equal(obj1,obj2) scm_is_true(scm_equal_p(obj1,obj2))
34 #define scm_is_exact(obj) scm_is_true(scm_exact_p(obj))
35 #define scm_is_list(obj) scm_is_true(scm_list_p(obj))
36 #define scm_is_procedure(obj) scm_is_true(scm_procedure_p(obj))