[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] Add C++ extern "C" guards to internal headers.
From: |
Andreas Rottmann |
Subject: |
Re: [PATCH 2/3] Add C++ extern "C" guards to internal headers. |
Date: |
Tue, 14 Jul 2015 21:36:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Taahir Ahmed <address@hidden> writes:
> ---
> libguile/__scm.h | 8 ++++++++
> [...]
>
> diff --git a/libguile/__scm.h b/libguile/__scm.h
> index 31e3952..1967069 100644
> --- a/libguile/__scm.h
> +++ b/libguile/__scm.h
> @@ -53,6 +53,10 @@
> /* What did the configure script discover about the outside world? */
> #include "libguile/scmconfig.h"
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>
>
>
> /* {Compiler hints}
> @@ -523,6 +527,10 @@ typedef long SCM_STACKITEM;
> # define SCM_THREAD_LOCAL
> #endif
>
> +#ifdef __cplusplus
> +}
> +#endif
> +
> #endif /* SCM___SCM_H */
>
Just a minor nitpick: it might make sense to add a pair of macros to
libguile/__scm.h for the '#ifdef __cplusplus' dance, so these
boilerplate additions become just two lines, e.g.:
+ SCM_BEGIN_DECLS
...
+ SCM_END_DECLS
This is done in GLib, for example, and cuts down the noise a bit.
Regards, Rotty
--
Andreas Rottmann -- <http://rotty.xx.vu/>