[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposal: scm_string2str() and scm_symbol2str()
From: |
Dirk Herrmann |
Subject: |
Re: proposal: scm_string2str() and scm_symbol2str() |
Date: |
Mon, 20 Nov 1995 19:38:38 +0100 (MET) |
On Fri, 16 Nov 2001, stefan wrote:
> If noone objects I would like to put the following piece into the
> "Decisions" section:
>
> * To have sane memory allocation interface between C and libguile
> put scm_c_free(), scm_c_malloc() and scm_c_realloc() into `gc.[ch]'.
What would these functions do?
> * Convert and implement these gh_*() functionality:
> gh_scm2newstr() ->
> char *scm_c_string2str (SCM obj, char *str, size_t *lenp)
I suggest to name this function scm_c_string2mem. The reason is, that it
may hold \0 characters. And, for those conversions that work the other
way around we have chosen to use 'mem' for char*/size_t pairs, and str for
zero terminated character arrays.
> gh_scm2newsymbol() ->
> char *scm_c_symbol2str (SCM obj, char *str, size_t *lenp)
Same as above: scm_c_symbol2mem
> gh_get_substr() ->
> char *scm_c_string2substr (SCM obj, char *str, size_t start, size_t len)
Hmmm. This should rather be named scm_c_substring2mem, shouldn't it?
> gh_scm2chars() ->
> char *scm_c_scm2chars (SCM obj, char *dst)
> gh_scm2shorts() ->
> short *scm_2_scm2shorts (SCM obj, short *dst)
> gh_scm2longs() ->
> long *scm_c_scm2longs (SCM obj, long *dst)
> gh_scm2floats() ->
> float *scm_c_scm2floats (SCM obj, float *dst)
> gh_scm2doubles() ->
> double *scm_c_scm2doubles (SCM obj, double *dst)
I don't know about these.
Best regards
Dirk Herrmann
- proposal: scm_string2str() and scm_symbol2str(), stefan, 2001/11/12
- Re: proposal: scm_string2str() and scm_symbol2str(), Thien-Thi Nguyen, 2001/11/12
- Re: proposal: scm_string2str() and scm_symbol2str(),
Dirk Herrmann <=
- Re: proposal: scm_string2str() and scm_symbol2str(), stefan, 2001/11/19
- Re: proposal: scm_string2str() and scm_symbol2str(), Dirk Herrmann, 2001/11/19
- Re: proposal: scm_string2str() and scm_symbol2str(), stefan, 2001/11/19
- Re: proposal: scm_string2str() and scm_symbol2str(), Dirk Herrmann, 2001/11/21
- Re: proposal: scm_string2str() and scm_symbol2str(), stefan, 2001/11/21
- Re: proposal: scm_string2str() and scm_symbol2str(), Dirk Herrmann, 2001/11/21
- Re: proposal: scm_string2str() and scm_symbol2str(), stefan, 2001/11/22
- Re: proposal: scm_string2str() and scm_symbol2str(), Dirk Herrmann, 2001/11/22
- Re: proposal: scm_string2str() and scm_symbol2str(), stefan, 2001/11/22
- Re: proposal: scm_string2str() and scm_symbol2str(), Dirk Herrmann, 2001/11/25