From aa0335a750cf3703b79820bb2b02d51956d7bb0e Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Thu, 24 Sep 2020 16:18:56 +0200 Subject: [PATCH] Trying to fix perl bindings --- xs/xsp/Model.xsp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xs/xsp/Model.xsp b/xs/xsp/Model.xsp index 844b7c95e..93067ebe3 100644 --- a/xs/xsp/Model.xsp +++ b/xs/xsp/Model.xsp @@ -118,7 +118,7 @@ load_stl(CLASS, path, object_name) %code%{ RETVAL = THIS->get_model(); %}; Ref config() - %code%{ RETVAL = &THIS->config; %}; + %code%{ RETVAL = &const_cast(THIS->config.get()); %}; std::string get_attribute(std::string name) %code%{ if (THIS->attributes.find(name) != THIS->attributes.end()) RETVAL = THIS->attributes[name]; %}; @@ -202,7 +202,7 @@ ModelMaterial::attributes() void set_input_file(std::string value) %code%{ THIS->input_file = value; %}; Ref config() - %code%{ RETVAL = &THIS->config; %}; + %code%{ RETVAL = &const_cast(THIS->config.get()); %}; Ref model() %code%{ RETVAL = THIS->get_model(); %}; @@ -248,7 +248,7 @@ ModelMaterial::attributes() Ref material(); Ref config() - %code%{ RETVAL = &THIS->config; %}; + %code%{ RETVAL = &const_cast(THIS->config.get()); %}; Ref mesh() %code%{ RETVAL = &THIS->mesh(); %};