Bug #615168: scm_c_string_length is the proper spelling now

Patch by Andy Wingo.

Fix up a couple uses of scm_i_string_length, and add a back-compat shim
for earlier versions.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19078 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-04-27 20:46:25 +00:00
parent 3ac9526ac8
commit 1ac44f0b8f
3 changed files with 7 additions and 7 deletions

View File

@ -136,7 +136,7 @@ gnc_scm2guid(SCM guid_scm)
GncGUID guid;
const gchar * str;
if (GUID_ENCODING_LENGTH != scm_i_string_length (guid_scm))
if (GUID_ENCODING_LENGTH != scm_c_string_length (guid_scm))
{
return *guid_null();
}
@ -154,7 +154,7 @@ gnc_guid_p(SCM guid_scm)
if (!scm_is_string(guid_scm))
return FALSE;
if (GUID_ENCODING_LENGTH != scm_i_string_length (guid_scm))
if (GUID_ENCODING_LENGTH != scm_c_string_length (guid_scm))
{
return FALSE;
}

View File

@ -2266,7 +2266,7 @@ gnc_option_set_ui_value_text (GNCOption *option, gboolean use_default,
if (scm_is_string(value))
{
const gchar *string = scm_to_locale_string(value);
gtk_text_buffer_set_text (buffer, string, scm_i_string_length(value));
gtk_text_buffer_set_text (buffer, string, scm_c_string_length(value));
return FALSE;
}
else

View File

@ -19,8 +19,7 @@
#include <libguile/version.h> /* for SCM_MAJOR_VERSION etc */
/* Backward-compatibility macros for guile-1.6 for functions which
were introduced in libguile-1.8.0 */
/* Give Guile 1.6 and 1.8 a 2.0-like interface */
#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 6)
# define scm_is_bool SCM_BOOLP
# define scm_is_false SCM_FALSEP
@ -32,9 +31,10 @@
# define scm_is_true SCM_NFALSEP
# define scm_is_vector SCM_VECTORP
# define scm_to_locale_string SCM_STRING_CHARS
# define scm_i_string_length SCM_STRING_LENGTH
# define scm_c_string_length SCM_STRING_LENGTH
#elif (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 8)
# define scm_c_string_length scm_i_string_length
#endif
/* Convenience macros */
#define scm_is_equal(obj1,obj2) scm_is_true(scm_equal_p(obj1,obj2))