From e1e2b7d583ee4c9e6e7615ba9af939a203911525 Mon Sep 17 00:00:00 2001 From: longemen3000 Date: Sun, 19 Mar 2023 02:47:23 -0300 Subject: [PATCH 1/4] make buffer_length dynamic --- Project.toml | 2 +- src/CoolProp.jl | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 9d3f594..3d3681e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "CoolProp" uuid = "e084ae63-2819-5025-826e-f8e611a84251" -version = "0.1.0" +version = "0.1.1" [deps] CoolProp_jll = "3351c21f-4feb-5f29-afb9-f4fcb0e27549" diff --git a/src/CoolProp.jl b/src/CoolProp.jl index 2dc900e..0435518 100644 --- a/src/CoolProp.jl +++ b/src/CoolProp.jl @@ -8,7 +8,7 @@ using CoolProp_jll #################################################################################################################### errcode = Ref{Clong}(0) -const buffer_length = 20000 +buffer_length = 20000 message_buffer = Array{UInt8}(undef, buffer_length) const inputs_to_get_global_param_string = ["version", "gitrevision", "errstring", "warnstring", "FluidsList", "incompressible_list_pure", "incompressible_list_solution", "mixture_binary_pairs_list", "parameter_list", "predefined_mixtures", "HOME", "cubic_fluids_schema"] @@ -172,6 +172,7 @@ julia> PhaseSI("T", 300, "P", 3541, "Water") CoolProp::PhaseSI(const std::string &, double, const std::string &, double, const std::string&) """ function PhaseSI(name1::AbstractString, value1::Real, name2::AbstractString, value2::Real, fluid::AbstractString) + buffer_length = length(message_buffer) val = ccall( (:PhaseSI, libcoolprop), Int32, (Cstring, Cdouble, Cstring, Cdouble, Cstring, Ptr{UInt8}, Int), name1, value1, name2, value2, fluid, message_buffer::Array{UInt8, 1}, buffer_length) val = unsafe_string(convert(Ptr{UInt8}, pointer(message_buffer::Array{UInt8, 1}))) if val == "" @@ -445,6 +446,7 @@ ref CoolProp::get_global_param_string * `key`: A string represents parameter name, could be one of $inputs_to_get_global_param_string """ function get_global_param_string(key::AbstractString) + buffer_length = length(message_buffer) val = ccall( (:get_global_param_string, libcoolprop), Clong, (Cstring, Ptr{UInt8}, Int), key, message_buffer::Array{UInt8, 1}, buffer_length) if val == 0 error("CoolProp: ", get_global_param_string("errstring")) @@ -475,6 +477,7 @@ A tabular output for this function is available with `?CoolProp_parameters` """ function get_parameter_information_string(key::AbstractString, outtype::AbstractString) message_buffer[1:length(outtype)+1] = [Vector{UInt8}(outtype); 0x00] + buffer_length = length(message_buffer) val = ccall( (:get_parameter_information_string, libcoolprop), Clong, (Cstring, Ptr{UInt8}, Int), key, message_buffer::Array{UInt8, 1}, buffer_length) if val == 0 error("CoolProp: ", get_global_param_string("errstring")) @@ -509,6 +512,7 @@ ParamName | Description A tabular output for this function is available with `?CoolProp_fluids` """ function get_fluid_param_string(fluid::AbstractString, param::AbstractString) + buffer_length = length(message_buffer) val = ccall( (:get_fluid_param_string, libcoolprop), Clong, (Cstring, Cstring, Ptr{UInt8}, Int), fluid, param, message_buffer::Array{UInt8, 1}, buffer_length) if val == 0 error("CoolProp: ", get_global_param_string("errstring")) @@ -770,6 +774,7 @@ julia> PR = AbstractState_factory("PR", "R245fa"); ``` """ function AbstractState_factory(backend::AbstractString, fluids::AbstractString) + buffer_length = length(message_buffer) AbstractState = ccall( (:AbstractState_factory, libcoolprop), Clong, (Cstring, Cstring, Ref{Clong}, Ptr{UInt8}, Clong), backend, fluids, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return AbstractState @@ -784,6 +789,7 @@ Release a state class generated by the low-level interface wrapper. * `handle`: The integer handle for the state class stored in memory """ function AbstractState_free(handle::Clong) + buffer_length = length(message_buffer) ccall( (:AbstractState_free, libcoolprop), Nothing, (Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing @@ -811,6 +817,7 @@ julia> AbstractState_free(handle); ``` """ function AbstractState_set_fractions(handle::Clong, fractions::Array{Float64}) + buffer_length = length(message_buffer) ccall( (:AbstractState_set_fractions, libcoolprop), Nothing, (Clong, Ptr{Cdouble}, Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, fractions, length(fractions), errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing @@ -842,6 +849,7 @@ julia> AbstractState_free(handle); ``` """ function AbstractState_update(handle::Clong, input_pair::Clong, value1::Real, value2::Real) + buffer_length = length(message_buffer) ccall( (:AbstractState_update, libcoolprop), Nothing, (Clong, Clong, Cdouble, Cdouble, Ref{Clong}, Ptr{UInt8}, Clong), handle, input_pair, value1, value2, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing @@ -865,6 +873,7 @@ Get an output value from the `AbstractState` using an integer value for the desi See `AbstractState_output` """ function AbstractState_keyed_output(handle::Clong, param::Clong) + buffer_length = length(message_buffer) output = ccall( (:AbstractState_keyed_output, libcoolprop), Cdouble, (Clong, Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, param, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) if output == -Inf @@ -924,6 +933,7 @@ julia> AbstractState_free(heos); ``` """ function AbstractState_specify_phase(handle::Clong, phase::AbstractString) + buffer_length = length(message_buffer) ccall( (:AbstractState_specify_phase, libcoolprop), Nothing, (Clong, Cstring, Ref{Clong}, Ptr{UInt8}, Clong), handle, phase, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing @@ -973,6 +983,7 @@ julia> AbstractState_free(handle); ``` """ function AbstractState_update_and_common_out(handle::Clong, input_pair::Clong, value1::Array{Float64}, value2::Array{Float64}, length::Integer, T::Array{Float64}, p::Array{Float64}, rhomolar::Array{Float64}, hmolar::Array{Float64}, smolar::Array{Float64}) + buffer_length = length(message_buffer) ccall( (:AbstractState_update_and_common_out, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Clong, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, input_pair, value1, value2, length, T, p, rhomolar, hmolar, smolar, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return T, p, rhomolar, hmolar, smolar @@ -1008,6 +1019,7 @@ Update the state of the AbstractState and get one output value (temperature, pre * `out`: The array for output """ function AbstractState_update_and_1_out(handle::Clong, input_pair::Clong, value1::Array{Float64}, value2::Array{Float64}, length::Integer, output::Clong, out::Array{Float64}) + buffer_length = length(message_buffer) ccall( (:AbstractState_update_and_1_out, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Clong, Clong, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, input_pair, value1, value2, length, output, out, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return out @@ -1047,6 +1059,7 @@ Update the state of the AbstractState and get an output value five common output * `out5`: The array for the fifth output """ function AbstractState_update_and_5_out(handle::Clong, input_pair::Clong, value1::Array{Float64}, value2::Array{Float64}, length::Integer, outputs::Array{Clong}, out1::Array{Float64}, out2::Array{Float64}, out3::Array{Float64}, out4::Array{Float64}, out5::Array{Float64}) + buffer_length = length(message_buffer) ccall( (:AbstractState_update_and_5_out, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Clong, Ref{Clong}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, input_pair, value1, value2, length, outputs, out1, out2, out3, out4, out5, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return out1, out2, out3, out4, out5 @@ -1093,6 +1106,7 @@ julia> AbstractState_free(handle); ``` """ function AbstractState_set_binary_interaction_double(handle::Clong, i::Integer, j::Integer, parameter::AbstractString, value::Real) + buffer_length = length(message_buffer) ccall( (:AbstractState_set_binary_interaction_double, libcoolprop), Nothing, (Clong, Clong, Clong, Cstring, Cdouble, Ref{Clong}, Ptr{UInt8}, Clong), handle, i, j, parameter, value, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing @@ -1129,6 +1143,7 @@ Set some fluid parameter (ie volume translation for cubic). Currently applied to * `value`: the value of the parameter """ function AbstractState_set_fluid_parameter_double(handle::Clong, i::Integer, parameter::AbstractString, value::Real) + buffer_length = length(message_buffer) ccall( (:AbstractState_set_fluid_parameter_double, libcoolprop), Nothing, (Clong, Clong, Cstring, Cdouble, Ref{Clong}, Ptr{UInt8}, Clong), handle, i, parameter, value, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing @@ -1156,6 +1171,7 @@ julia> AbstractState_first_saturation_deriv(as, get_param_index("Hmolar"), get_p double CoolProp::AbstractState_first_saturation_deriv(const long handle, const long Of, const long Wrt, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_first_saturation_deriv(handle::Clong, of::Clong, wrt::Clong) + buffer_length = length(message_buffer) output = ccall( (:AbstractState_first_saturation_deriv, libcoolprop), Cdouble, (Clong, Clong, Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, of, wrt, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) if output == -Inf @@ -1189,7 +1205,8 @@ julia> AbstractState_first_partial_deriv(as, get_param_index("Hmolar"), get_para double CoolProp::AbstractState_first_partial_deriv(const long handle, const long Of, const long Wrt, const long Constant, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_first_partial_deriv(handle::Clong, of::Clong, wrt::Clong, constant::Clong) - output = ccall( (:AbstractState_first_partial_deriv, libcoolprop), Cdouble, (Clong, Clong, Clong, Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, of, wrt, constant, errcode, message_buffer::Array{UInt8, 1}, buffer_length) + buffer_length = length(message_buffer) + utput = ccall( (:AbstractState_first_partial_deriv, libcoolprop), Cdouble, (Clong, Clong, Clong, Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, of, wrt, constant, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) if output == -Inf error("CoolProp: no correct state has been set with AbstractState_update") @@ -1213,6 +1230,7 @@ If there is an error in an update call for one of the inputs, no change in the o CoolPRop::AbstractState_build_phase_envelope(const long handle, const char* level, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_build_phase_envelope(handle::Clong, level::AbstractString) + buffer_length = length(message_buffer) ccall( (:AbstractState_build_phase_envelope, libcoolprop), Nothing, (Clong, Cstring, Ref{Clong}, Ptr{UInt8}, Clong), handle, level, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing @@ -1251,6 +1269,7 @@ If there is an error in an update call for one of the inputs, no change in the o CoolProp::AbstractState_get_phase_envelope_data(const long handle, const long length, double* T, double* p, double* rhomolar_vap, double* rhomolar_liq, double* x, double* y, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_get_phase_envelope_data(handle::Clong, length::Integer, T::Array{Float64}, p::Array{Float64}, rhomolar_vap::Array{Float64}, rhomolar_liq::Array{Float64}, x::Array{Float64}, y::Array{Float64}) + buffer_length = length(message_buffer) ccall( (:AbstractState_get_phase_envelope_data, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, length, T, p, rhomolar_vap, rhomolar_liq, x, y, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return T, p, rhomolar_vap, rhomolar_liq, x, y @@ -1274,6 +1293,7 @@ Build the spinodal. CoolProp::AbstractState_build_spinodal(const long handle, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_build_spinodal(handle::Clong) + buffer_length = length(message_buffer) ccall( (:AbstractState_build_spinodal, libcoolprop), Nothing, (Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing @@ -1304,6 +1324,7 @@ julia> tau, delta, m1 = AbstractState_get_spinodal_data(HEOS, 127); CoolProp::AbstractState_get_spinodal_data(const long handle, const long length, double* tau, double* delta, double* M1, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_get_spinodal_data(handle::Clong, length::Integer, tau::Array{Float64}, delta::Array{Float64}, m1::Array{Float64}) + buffer_length = length(message_buffer) ccall( (:AbstractState_get_spinodal_data, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, length, tau, delta, m1, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return tau, delta, m1; @@ -1334,6 +1355,7 @@ If there is an error in an update call for one of the inputs, no change in the o CoolProp::AbstractState_all_critical_points(const long handle, const long length, double* T, double* p, double* rhomolar, long* stable, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_all_critical_points(handle::Clong, length::Integer, T::Array{Float64}, p::Array{Float64}, rhomolar::Array{Float64}, stable::Array{Clong}) + buffer_length = length(message_buffer) ccall( (:AbstractState_all_critical_points, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ref{Clong}, Ptr{UInt8}, Clong), handle, length, T, p, rhomolar, stable, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return T, p, rhomolar, stable From 0972779d65a01434706205898846a95b6e3578ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Riedemann?= <38795484+longemen3000@users.noreply.github.com> Date: Sun, 24 Sep 2023 01:23:45 -0300 Subject: [PATCH 2/4] make message_buffer const, change length to accomodate longest JSON --- src/CoolProp.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/CoolProp.jl b/src/CoolProp.jl index 0435518..13a2b71 100644 --- a/src/CoolProp.jl +++ b/src/CoolProp.jl @@ -8,8 +8,7 @@ using CoolProp_jll #################################################################################################################### errcode = Ref{Clong}(0) -buffer_length = 20000 -message_buffer = Array{UInt8}(undef, buffer_length) +const message_buffer = Array{UInt8}(undef, 32768) #2^15 const inputs_to_get_global_param_string = ["version", "gitrevision", "errstring", "warnstring", "FluidsList", "incompressible_list_pure", "incompressible_list_solution", "mixture_binary_pairs_list", "parameter_list", "predefined_mixtures", "HOME", "cubic_fluids_schema"] From 6ee3faed22be50e08e122d6fa655feee2626c7a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Riedemann?= <38795484+longemen3000@users.noreply.github.com> Date: Sun, 24 Sep 2023 01:32:39 -0300 Subject: [PATCH 3/4] missing length(message_buffer) --- src/CoolProp.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CoolProp.jl b/src/CoolProp.jl index 13a2b71..eaa820a 100644 --- a/src/CoolProp.jl +++ b/src/CoolProp.jl @@ -947,6 +947,7 @@ Unspecify the phase to be used for all further calculations. * `handle`: The integer handle for the state class stored in memory """ function AbstractState_unspecify_phase(handle::Clong) + buffer_length = length(message_buffer) ccall( (:AbstractState_unspecify_phase, libcoolprop), Nothing, (Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing @@ -1125,6 +1126,7 @@ Set cubic's alpha function parameters. * `c3`: the third parameter for the alpha function """ function AbstractState_set_cubic_alpha_C(handle::Clong, i::Integer, parameter::AbstractString, c1::Real, c2::Real, c3::Real) + buffer_length = length(message_buffer) ccall( (:AbstractState_set_cubic_alpha_C, libcoolprop), Nothing, (Clong, Clong, Cstring, Cdouble, Cdouble, Cdouble, Ref{Clong}, Ptr{UInt8}, Clong), handle, i, parameter, c1, c2, c3, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return nothing From ec8854015bf5b4903810db1b398187ceff9e8940 Mon Sep 17 00:00:00 2001 From: Bart Janssens Date: Sun, 24 Sep 2023 20:55:54 +0200 Subject: [PATCH 4/4] Call Base.length where needed --- src/CoolProp.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CoolProp.jl b/src/CoolProp.jl index eaa820a..9afc7e7 100644 --- a/src/CoolProp.jl +++ b/src/CoolProp.jl @@ -983,7 +983,7 @@ julia> AbstractState_free(handle); ``` """ function AbstractState_update_and_common_out(handle::Clong, input_pair::Clong, value1::Array{Float64}, value2::Array{Float64}, length::Integer, T::Array{Float64}, p::Array{Float64}, rhomolar::Array{Float64}, hmolar::Array{Float64}, smolar::Array{Float64}) - buffer_length = length(message_buffer) + buffer_length = Base.length(message_buffer) ccall( (:AbstractState_update_and_common_out, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Clong, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, input_pair, value1, value2, length, T, p, rhomolar, hmolar, smolar, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return T, p, rhomolar, hmolar, smolar @@ -1019,7 +1019,7 @@ Update the state of the AbstractState and get one output value (temperature, pre * `out`: The array for output """ function AbstractState_update_and_1_out(handle::Clong, input_pair::Clong, value1::Array{Float64}, value2::Array{Float64}, length::Integer, output::Clong, out::Array{Float64}) - buffer_length = length(message_buffer) + buffer_length = Base.length(message_buffer) ccall( (:AbstractState_update_and_1_out, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Clong, Clong, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, input_pair, value1, value2, length, output, out, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return out @@ -1059,7 +1059,7 @@ Update the state of the AbstractState and get an output value five common output * `out5`: The array for the fifth output """ function AbstractState_update_and_5_out(handle::Clong, input_pair::Clong, value1::Array{Float64}, value2::Array{Float64}, length::Integer, outputs::Array{Clong}, out1::Array{Float64}, out2::Array{Float64}, out3::Array{Float64}, out4::Array{Float64}, out5::Array{Float64}) - buffer_length = length(message_buffer) + buffer_length = Base.length(message_buffer) ccall( (:AbstractState_update_and_5_out, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Clong, Ref{Clong}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, input_pair, value1, value2, length, outputs, out1, out2, out3, out4, out5, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return out1, out2, out3, out4, out5 @@ -1270,7 +1270,7 @@ If there is an error in an update call for one of the inputs, no change in the o CoolProp::AbstractState_get_phase_envelope_data(const long handle, const long length, double* T, double* p, double* rhomolar_vap, double* rhomolar_liq, double* x, double* y, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_get_phase_envelope_data(handle::Clong, length::Integer, T::Array{Float64}, p::Array{Float64}, rhomolar_vap::Array{Float64}, rhomolar_liq::Array{Float64}, x::Array{Float64}, y::Array{Float64}) - buffer_length = length(message_buffer) + buffer_length = Base.length(message_buffer) ccall( (:AbstractState_get_phase_envelope_data, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, length, T, p, rhomolar_vap, rhomolar_liq, x, y, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return T, p, rhomolar_vap, rhomolar_liq, x, y @@ -1325,7 +1325,7 @@ julia> tau, delta, m1 = AbstractState_get_spinodal_data(HEOS, 127); CoolProp::AbstractState_get_spinodal_data(const long handle, const long length, double* tau, double* delta, double* M1, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_get_spinodal_data(handle::Clong, length::Integer, tau::Array{Float64}, delta::Array{Float64}, m1::Array{Float64}) - buffer_length = length(message_buffer) + buffer_length = Base.length(message_buffer) ccall( (:AbstractState_get_spinodal_data, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ptr{UInt8}, Clong), handle, length, tau, delta, m1, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return tau, delta, m1; @@ -1356,7 +1356,7 @@ If there is an error in an update call for one of the inputs, no change in the o CoolProp::AbstractState_all_critical_points(const long handle, const long length, double* T, double* p, double* rhomolar, long* stable, long* errcode, char* message_buffer, const long buffer_length); """ function AbstractState_all_critical_points(handle::Clong, length::Integer, T::Array{Float64}, p::Array{Float64}, rhomolar::Array{Float64}, stable::Array{Clong}) - buffer_length = length(message_buffer) + buffer_length = Base.length(message_buffer) ccall( (:AbstractState_all_critical_points, libcoolprop), Nothing, (Clong, Clong, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Clong}, Ref{Clong}, Ptr{UInt8}, Clong), handle, length, T, p, rhomolar, stable, errcode, message_buffer::Array{UInt8, 1}, buffer_length) raise(errcode, message_buffer) return T, p, rhomolar, stable