This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: scm_must_* and K&R C
- To: guile@sourceware.cygnus.com
- Subject: Re: scm_must_* and K&R C
- From: Ken Raeburn <raeburn@raeburn.org>
- Date: 28 Aug 1999 19:15:15 -0400
- References: <199908281703.TAA04006@forcix.roof.lan>
forcer <forcer@mindless.com> writes:
> Guile uses K&R C for backwards compatibility. That's ok, but it
> gets annoying when you have to cast your return values of
> scm_must_malloc or the parameter for scm_must_free each time just
> to prevent those stupid warnings.
Last I checked, "K&R C" didn't include prototype support.
If we're using prototypes unconditionally, we can probably use void*
unconditionally, can't we?
> +#ifdef __STDC__
> +
> +extern void * scm_must_malloc (scm_sizet len, const char *what);
> +extern void * scm_must_realloc (void *where,
> + scm_sizet olen, scm_sizet len,
> + const char *what);
> +extern void scm_must_free (void *obj);
> +#else
> extern char * scm_must_malloc (scm_sizet len, const char *what);
> extern char * scm_must_realloc (char *where,
> scm_sizet olen, scm_sizet len,
> const char *what);
> -extern void scm_done_malloc (long size);
> extern void scm_must_free (char *obj);
> +#endif /* __STDC__ */
> +extern void scm_done_malloc (long size);