Skip to content

Commit 6d4181c

Browse files
committed
fixing the upcasting
1 parent b83bce1 commit 6d4181c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.ci/build_tarballs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using BinaryBuilder
44
using Pkg
55

66
name = "FastJet_Julia_Wrapper"
7-
version = v"0.7.0"
7+
version = v"0.7.2"
88

99
# Collection of sources required to build Fjwbuilder
1010
sources = [

src/fastJetWrap.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
using namespace std;
99
using namespace fastjet;
1010

11+
namespace jlcxx {
12+
template<> struct SuperType<contrib::ValenciaPlugin> {
13+
using type = JetDefinition::Plugin;
14+
};
15+
}
16+
1117
JLCXX_MODULE define_julia_module(jlcxx::Module& fastjet)
1218
{
1319
fastjet.add_bits<JetAlgorithm>("JetAlgorithm", jlcxx::julia_type("CppEnum"));
@@ -112,8 +118,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& fastjet)
112118
.constructor<double, double>()
113119
.constructor<double, double, double>();
114120

115-
fastjet.method("JetDefinition", [](const JetDefinition::Plugin* p) {
116-
return JetDefinition(p);
121+
fastjet.method("JetDefinition", [](const JetDefinition::Plugin& p) {
122+
return JetDefinition(&p);
117123
});
118124

119125
fastjet.method("constituents", [](const PseudoJet& pj) {

0 commit comments

Comments
 (0)