Hi Mike, Mike Gran <spk...@yahoo.com> writes:
>> From: Ludovic Courtès <l...@gnu.org> > >> >> Besides, there’s the undocumented ‘scm_from_stringn’ and the internal >> >> ‘scm_to_stringn’, which can convert from/to any encoding. I think they >> >> were initially kept internal because we weren’t quite sure about the >> >> API. Mike? >> > >> > Also, I think we were trying to avoid compilation problems based on >> > having to expose the libunistring's enum iconv_ilseq_handle to the world. >> > But later, we ended up creating the analogous >> > scm_t_string_failed_conversion_handler type to work around that problem. >> >> Right. So I guess they can now be made public & documented. Would you >> like to do it? :-) > > Perhaps something like the attached? Yes, excellent! > +...@deftp {C type} scm_t_string_failed_conversion_handler Should be “C Type”... [...] > +...@deftypefn {C function} char *scm_to_stringn (SCM str, size_t *lenp, > const char *encoding, scm_t_string_failed_conversion_handler handler) ... and “C Function”. > +Returns a newly allocated C string from the Guile string @var{str}. The Should be “Return”. [...] > +/* Macros */ > +#define scm_to_iso88591_stringn(s,lenp) \ > + scm_to_stringn ((s), (lenp), NULL, SCM_FAILED_CONVERSION_ERROR) > +#define scm_from_iso88591_stringn(s,len) \ > + scm_from_stringn ((s), (len), NULL, SCM_FAILED_CONVERSION_ERROR) Please make them functions so that the implementation can eventually be changed without breaking the ABI. Apart from that, if Andy agrees, you can go ahead and push. Thanks! Ludo’.