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

Re: callback pointer problem solved



On Wed, Jun 02, 1999 at 04:31:32PM +0200, Emmanuel DELOGET wrote:
> 	Then you have Luck... Since declaring a function
> 	with static does not modify it's own code, your problem
> 	should not be modified, but your are lucky (not so, in
> 	fact, because the bug should reappear, causing some 
> 	serious segfaults).

maybe declaring the callback function as static is neccessary because i'm
using c++.


> 	Since you get a pointer in your callback, it is important
> 	to see wether the scope of the pointer is good or not. If
> 	your 'key' var is defined as static in your setup function
> 	it would be ok (since it will allways be there). The same
> 	can be achieved by declaring key as a global var.

the scope is ok since the var key is a class member and the class is still
alive (otherwise the signal won't be caught).

gernot
-- 
DI Kerschbaumer Gernot
Software Development
FREQUENTIS
A-1120 Wien, Spittelbreitengasse 34
gkerschb@frequentis.com



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