[gst-devel] Re: [gst-cvs] company gstreamer: gstreamer/gst/

David I. Lehn dlehn at vt.edu
Sun Apr 7 19:47:02 CEST 2002


* Benjamin Otte <company at users.sourceforge.net> [20020406 14:04]:
> Log message:
> added 'extern C' stuff to some headers
> 
> Modified files:
>     gst             : gstcaps.h gstprops.h
> 
> +#ifdef __cplusplus
> +extern "C" {
> +#endif /* __cplusplus */
> +
...
> +
> +#ifdef __cplusplus
> +}
> +#endif /* __cplusplus */

wingo suggested we at least use glib macros for this nonsense since it
looks cleaner.  I agree:

G_BEGIN_DECLS
G_END_DECLS

<rant>

I personally think this sort of thing is totally inappropriate to put in
C code.  If C++ people have problems linking to C libraries THEY should
put these constructs around the #includes of C headers in THEIR code.

What if I insist we do the same for my made up language?  Any objections
to adding this to every C header on your system:

#ifdef __taaz_c
extern "C" {
#endif

Clearly that is a terrible idea.  Why is it acceptable to do it for C++?

I realize that explaining all this to brainwashed C++ people is just a
royal pain and a FAQ probably wouldn't help.

</rant>

-dave
-- 
David I. Lehn <dlehn at vt.edu>  | http://crib.lehn.org:8080/~dlehn/
Computer Engineering Graduate @ Virginia Tech in sunny Blacksburg, VA




More information about the gstreamer-devel mailing list