From 6432567a6ec4d1f1ea3dcde444bdc16652c978b3 Mon Sep 17 00:00:00 2001 From: guilhermebodin Date: Tue, 30 May 2023 17:49:24 -0300 Subject: [PATCH] update checked macro --- src/utils.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 9030b27c..18ec07e0 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -132,10 +132,10 @@ macro checked(expr) @assert ( expr.args[1].head == :(.) ) && ( expr.args[1].args[1] == :Lib) "Can only use @checked on Lib.\$function" @assert length(expr.args) >= 2 "Lib.\$function must be contain atleast one argument and the first argument must be of type XpressProblem" f = replace(String(expr.args[1].args[2].value), "XPRS" => "") - return esc(quote - r = $(expr)::Cint - _check($(expr.args[2]), r)::Nothing - end) + return quote + r = $(esc(expr))::Cint + _check($(esc(expr.args[2])), r)::Nothing + end end function _check(prob, val::Cint)