| 1087 | } |
| 1088 | |
| 1089 | EXPORT_CODE void CONVENTION AbstractState_fluid_param_string(const long handle, const char* param, char* return_buffer, |
| 1090 | const long return_buffer_length, long* errcode, char* message_buffer, |
| 1091 | const long buffer_length) { |
| 1092 | *errcode = 0; |
| 1093 | fpu_reset_guard guard; |
| 1094 | try { |
| 1095 | shared_ptr<CoolProp::AbstractState>& AS = handle_manager.get(handle); |
| 1096 | std::string temp = AS->fluid_param_string(param); |
| 1097 | if (temp.size() < static_cast<std::size_t>(return_buffer_length)) { |
| 1098 | std::memcpy(return_buffer, temp.c_str(), temp.size() + 1); // guarded above: size + null fits |
| 1099 | } else { |
| 1100 | *errcode = 2; |
| 1101 | } |
| 1102 | } catch (...) { |
| 1103 | HandleException(errcode, message_buffer, buffer_length); |
| 1104 | } |
| 1105 | } |
| 1106 | |
| 1107 | EXPORT_CODE double CONVENTION AbstractState_saturated_liquid_keyed_output(const long handle, const long param, long* errcode, char* message_buffer, |
| 1108 | const long buffer_length) { |
nothing calls this directly
no test coverage detected