Hi Dave, You are right. The function was written to be called once. I have modified the code to follow your proposal. Fix now in CVS. Rene Brun Dave Casper wrote: > > Hi, > > TClass::IgnoreTObjectStreamer() has a somewhat annoying feature. You can > only call it once for a given class, even if you do not actually change the > setting on the second call. I.e., if you do > > TMyClass::Class()->IgnoreTObjectStreamer(kTRUE); > TMyClass::Class()->IgnoreTObjectStreamer(kTRUE); > > (of course in real life you would not call it on consecutive lines, but in > different routines which are called in an a priori unknown order). > > the second call resets the flag in question (as if you had called it with > kFALSE instead of kTRUE), checks whether a TStreamerInfo exists for the > class in question, and then returns an error without taking further action > if it does exist. This then leads to a subsequent access violation. > > What this method should do, I think, is check whether the "ignore" bit > already corresponds to the requested setting (regardless of whether the > requested setting is kTRUE or kFALSE). If so, just return. If not, then > check whether it is too late to change the setting and raise the error if it > is. > > Dave > dcasper@uci.edu
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:34 MET