From: Christophe de V. <cde...@al...> - 2005-06-17 07:51:44
|
Good morning, Le Vendredi 17 Juin 2005 09:39, Thomas Jarosch a =E9crit=A0: > > > I was typing faster than thinking... doing nothing is not possible > > > as libxml2 needs to be initialized. IMHO there is no ABI compatible > > > way of replacing the global initialization code, is there? > > > > I think so, with the global init doing nothing IF an environnement > > variable "LIBXMLPP_NO_STATIC_INIT" has been defined. > > This still requires recompilation and is therefore not ABI compatible, > IMHO. I think I disagree : the current global initialisation is done by Init::Ini= t.=20 We can, without breaking the ABI, change its behavior so it does nothing wh= en=20 a particular environment variable is set. We can add another class, let's say InitNG, which does what you suggested f= or=20 Init. This way people who want to do manual initialisation can do it by setting t= his=20 variable. Another way I just thought about is not to change Init::Init behavior, but= =20 adding both another init class and a free function (probably a static=20 function of the new init class) which undo what Init have done and forces=20 it's destructor not to do anything. The advantage is that the proper behavior of the program does not depend on= a=20 user intervention. Christophe |