[gtkmm] wrong shadowing of the ERROR constant



in gdkmm/types.h

#if defined(ERROR) && !defined(GTKMM_MACRO_SHADOW_ERROR)
enum { GTKMM_MACRO_DEFINITION_ERROR = ERROR };
#undef ERROR

I hope you please remove this, as it is not letting my apps compile,
I know it may be needed to compile in windows

A library is not supposed to have this kind of constant defined,
and even if it's a bogus windows idiocy , but this is not the way to handle it,
why? because It is very common to be used as a function

	if (conditionfails) 
		ERROR("blahblah");


it should be

#if defined(ERROR) && !defined(GTKMM_MACRO_SHADOW_ERROR)
#define GTKMM_MACRO_DEFINITION_ERROR ERROR 
#undef ERROR

then you define the the enum and everything


and at the end

#if defined(GTKMM_MACRO_SHADOW_ERROR)

#define ERROR GTKMM_MACRO_SHADOW_ERROR


Juan Linietsky










[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]