Glynn Clements glynn at gclements.plus.com
Thu Apr 19 11:50:55 EDT 2007

John Gillette wrote:

> In lib/vector/dglib/graph.h  there is __BEGIN_DECLS (near top) and
> __END_DECLS (at bottom).
> Are these needed?


> What do they do?

They are defined like so in type.h:

	#ifdef __cplusplus
	# define __BEGIN_DECLS extern "C" {
	# define __END_DECLS }
	# define __BEGIN_DECLS /* empty */
	# define __END_DECLS /* empty */

Essentially, they allow the header to be used in C++ code. As the
rest of GRASS doesn't do this, there doesn't seem much point doing it
in a few specific headers.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list