I'm afraid, this type can be omitted by conforming implementation. ________________________________________ From: owner-roottalk@root.cern.ch [owner-roottalk@root.cern.ch] on behalf of Sebastien Binet [binet@cern.ch] Sent: 14 December 2011 16:08 To: Bertrand Bellenot; Georg Troska Cc: roottalk@lxroot01.cern.ch; Stephan von Kleist Subject: RE: [ROOT] Possible to use multiple Slots On Wed, 14 Dec 2011 14:49:50 +0000, Bertrand Bellenot <Bertrand.Bellenot@cern.ch> wrote: > I wouldn't worry too much. As you just figured out, the compiler is > right: int32_t is too small for a pointer on a 64bit architecture. I > always use a Long_t (or ULong_t) when casting pointers, but using > size_t doesn't hurt and is maybe cleaner. Up to you ;) shouldn't you just use (u)intptr_t for that job ? http://en.wikipedia.org/wiki/C_data_types#Fixed_width_integer_types -s > > Cheers, Bertrand. > > -----Original Message----- > From: Georg Troska [mailto:georg.troska@uni-dortmund.de] > Sent: 14 December 2011 15:03 > To: Bertrand Bellenot > Cc: roottalk@lxroot01.cern.ch; Stephan von Kleist > Subject: Re: [ROOT] Possible to use multiple Slots > > Hi, > > Yes I tried it with size_t on 64 bit and it works > > But - I do not exactly know why :-) > Seems to be an implicit type cast - but in which kind of variable? > > I just tried to cast to int64_t - this works. int32_t does not complie! The error is > > slot.h:24: error: cast from 'Data*' to 'int32_t' loses precision > > Maybe the compliler recognises an invalid kind of cast. Could be that I was too afraid of this. > Would you recommend to use Long_t or size_t? > > Georg > Am 14.12.2011 um 14:28 schrieb Bertrand Bellenot: > > > Hi Georg, > > > > Well, I think Long_t follows the architecture (32bit/64bit)... I only tried on 32bit, and it works > > And did you try with size_t? (it works also on 32bit) > > > > Cheers, Bertrand. > > > > -----Original Message----- > > From: Georg Troska [mailto:georg.troska@uni-dortmund.de] > > Sent: 14 December 2011 14:10 > > To: Bertrand Bellenot > > Cc: roottalk@lxroot01.cern.ch; Stephan von Kleist > > Subject: Re: [ROOT] Possible to use multiple Slots > > > > Hi Bertand, > > > > worked! Great. Thank you very much > > > > I'm a bit afraid that the cast of a pointer into a Long_t depends on the system. The pointer might be either 32 bit or 64 bit long. I tried if it worked with a size_t, which is, as far as I understand made for thinks like this (It is 32bit long on a 32bit system, and 64bit on a 64bit system). This works too, but why isn't there Emit-method for a size_t? > > > > I do not have a chance here to test it on 32 bit. Do I need to worry? > > > > Georg > > > > > > > > Am 13.12.2011 um 09:31 schrieb Bertrand Bellenot: > > > >> Hi Georg, > >> > >> Could you try to replace: > >> EmitVA("sendData(Data*)",1,d); > >> By: > >> Emit("sendData(Data*)",(Long_t)d); > >> > >> And try again? (this works fine for me) > >> > >> Cheers, Bertrand. > >> > >> -----Original Message----- > >> From: Georg Troska [mailto:georg.troska@uni-dortmund.de] > >> Sent: 12 December 2011 17:07 > >> To: Bertrand Bellenot > >> Cc: roottalk@lxroot01.cern.ch; Stephan von Kleist > >> Subject: Re: [ROOT] Possible to use multiple Slots > >> > >> Hello Betrand, > >> > >> thank you very much for your responds. I was able to create a simple script, showing the error: > >> > > > -- ######################################### # Dr. Sebastien Binet # Laboratoire de l'Accelerateur Lineaire # Universite Paris-Sud XI # Batiment 200 # 91898 Orsay #########################################Received on Wed Dec 14 2011 - 16:12:46 CET
This archive was generated by hypermail 2.2.0 : Wed Dec 14 2011 - 17:50:02 CET