Re: atomic reference counting for gmain.c

On Fri, Feb 27, 2004 at 06:18:43PM +0100, Sebastian Wilhelmi wrote:
> Or we change the API of g_atomic_int from taking gint32 to taking
> gint... That sounds better actually. Should better avoid unpleasant
> surprises.

	Actually, the converse is true.  Folks who use atomic counters
can count pretty high.  The Linux Kernel has this problem, where
atomic_t is limited to 24 bits (thanks to sparc32), so there is a big
fat comment about the counter limit.
	If you use gint32, everyone knows the max.  If you use gint,
folks will have to realize that their code that counts >MAX_INT32 will
break on non-64bit platforms.



"What do you take me for, an idiot?"  
        - General Charles de Gaulle, when a journalist asked him
          if he was happy.
			jlbec evilplan org

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