Skip to content

PluginFactoryBase::make_return problem with longs #875

@andresailer

Description

@andresailer

namespace dd4hep {
template <> inline long PluginFactoryBase::make_return(const long& value)
{ static long stored=value; return (long)&stored; }
}

As long is only at least 32 bits, and I am using a 64 bit system, this casting to long is going to not allow one to retrieve the value of the long because the ptr address will be a bit random, right?
Instead return a long*?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions