Re: SEEK_* enum values in SeekType



Hi Gergo,

	Ok - so this problem is nasty; I think the best approach is to change
these to SeekCur, SeekPos, SeekEnd etc. following the Java naming
convention more.

	The problems are:

	a) We want to do this for everything really,
	b) We need to be able to measure the impact and get release team
	   approval first
	c) We need to do it fast.

	Can you do an LXR search and find out which enumerations are used
outside the core, what we would need to change to make it work, and how
much it would break people.

	Then we can think about doing it - really good that you've picked up on
this now.

	Thanks,

		Michael.

On Tue, 2002-03-19 at 15:48, ERDI Gergo wrote:
> yes but -- defines are not namespaced, so both the definitioan and the
> usage of the enum is going to break, since the following two scraps of
> code:
> 
> // 1
> namespace Bonobo {
> 	class Stream {
> 		enum SeekType {
> 			SEEK_CUR,
> 			SEEK_POS,
> 			SEEK_END
> 		}
> 	}
> }
> 
> // 2
> void DoSomethingInCpp (Bonobo::Stream_ptr stream)
> {
> 	// Rewind stream
> 	storage->seek (Bonobo::Stream::SEEK_POS, 0);
> }
> 
> will first be translated by the preprocessor to:
> 
> // 1
> namespace Bonobo {
> 	class Stream {
> 		enum SeekType {
> 			0,
> 			1,
> 			2
> 		}
> 	}
> }	
> 
> // 2
> void DoSomethingInCpp (Bonobo::Stream_ptr stream)
> {
>         // Rewind stream
>         storage->seek (Bonobo::Stream::0, 0);
> } 
> 
> Which is never going to work.
> 
> -- 
>    .--= ULLA! =---------------------.   `We are not here to give users what
>    \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
>     `---= cactus cactus rulez org =---'
> God is Real, unless declared Integer.
> 
> 
> _______________________________________________
> gnome-components-list mailing list
> gnome-components-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-components-list
-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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