Re: tbufferfile in pyroot

From: <wlavrijsen_at_lbl.gov>
Date: Mon, 14 Nov 2011 11:00:31 -0800


Andy,

> (Incidentally, it's odd that the TBuffer constructor takes the buffer as a
> null pointer... a char* seems a more sensible choice since it has to be a
> byte sequence.)

odd it may be, but it is the C++ interface:

      TBuffer(EMode mode, Int_t bufsiz, void *buf, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = 0);

and hence it is what PyROOT gets reflected from the CINT dictionary. Note that normal python strings are not passed through void* arguments by PyROOT for the exact reason that you mentioned, but they would have passed (of course) through a char* argument.

Best regards,

            Wim

-- 
WLavrijsen_at_lbl.gov    --    +1 (510) 486 6411    --    www.lavrijsen.net
Received on Mon Nov 14 2011 - 20:00:45 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 14 2011 - 23:50:02 CET