RE:[ROOT] references to pointers oddities

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Wed May 10 2000 - 15:40:51 MEST


Dear Stefano,

Thank you for reporting this problem. This is a cint bug.
I'll fix this in cint5.14.38. Meanwhile, you can patch this 
problem by modifying src/ifunc.c or src/CINT_ifunc.c line 4070.

if(-1 != (baseoffset=G__ispublicbase(formal_tagnum,param_tagnum
                                             ,param->obj.i))) {
          param->tagnum = formal_tagnum;
          param->obj.i += baseoffset;
          param->ref += baseoffset;    /*<<< line 4070 */
          /* param->ref = 0; */

Masaharu Goto

>
>Dear Rooters,
>        I recently upgraded from Root 2.23.12 to 2.24.04,
>        and a macro of mines worked no more. It seems that
>        CINT doesn't handle pointers passed by reference
>        any more:
>
>        void foo(TPad *&a_pad) { a_pad = new TPad(...); }
>
>        when foo() is called, a_pad in not NULL inside the
>        function, but the pointer passed as argument to foo()
>        is not changed in the main. Passing a double pointer
>        works though:
>        
>        void foo(TPad **pad_pt) { TPad *&a_pad = *pad_pt; a_pad = new 
TPad(...); }
>
>        any comment?
>
>----------------------------------------------------------
>E-Mail: Stefano Bettelli <bettelli@tn.infn.it>
>WWW   : http://meitner.tn.infn.it/~bettelli
>Tel   : +39-0347-1663760



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:25 MET