Skip to content

Commit

Permalink
Fix up buffer length for fugacity functions
Browse files Browse the repository at this point in the history
  • Loading branch information
barche committed Dec 7, 2023
1 parent 908a0a8 commit 3297e33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CoolProp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ julia> AbstractState_free(handle);
```
"""
function AbstractState_get_fugacity(handle::Clong, i::Integer)
buffer_length = length(message_buffer)
output = ccall( (:AbstractState_get_fugacity, libcoolprop), Cdouble, (Clong, Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, i, errcode, message_buffer::Array{UInt8, 1}, buffer_length)
raise(errcode, message_buffer)
return output
Expand Down Expand Up @@ -976,6 +977,7 @@ julia> AbstractState_free(handle);
```
"""
function AbstractState_get_fugacity_coefficient(handle::Clong, i::Integer) #TODO: maybe type this as an integer?
buffer_length = length(message_buffer)
output = ccall( (:AbstractState_get_fugacity_coefficient, libcoolprop), Cdouble, (Clong, Clong, Ref{Clong}, Ptr{UInt8}, Clong), handle, i, errcode, message_buffer::Array{UInt8, 1}, buffer_length)
raise(errcode, message_buffer)
return output
Expand Down

0 comments on commit 3297e33

Please sign in to comment.