TPad *pp=(TPad*)gPad with CINT (5.32.00)

Dear Rooters,

with version 5.28.00d the following used to work with CINT:

root [0] TCanvas *c = new TCanvas();
root [1] TPad * pp = (TPad*)gPad
root [2] pp
(class TPad*)0x29da160
root [3] gPad
(class TCanvas*)0x29da160

With 5.32.00

root [0] TCanvas *c = new TCanvas(); root [1] TPad * pp = (TPad*)gPad root [2] pp (class TPad*)0x9e63a0 root [3] gPad (class TVirtualPad*)0x11b1750
Note pp is not equal to gPad and using pp does a segmentation violation.

The code of gPad alias TVirtualPad *&TVirtualPad::Pad() changed
in 5.32.00 (core/base/src/TVirtualPad.cxx)

With compiled code (ACLIC) it works.

Cheers
Otto

Hi,

Indeed (TPad*)gPad returns the wrong value. However TVirtualPad *p = gPad;works as expected.

Cheers,
Philippe.

Hi,

The problem is solved in the trunk (r43072) and in the v5.32 patch branch.

Cheers,
Philippe.