Do JuMP Variable ensure contiguous memory to Gurobi?

The motivation is that I notices Gurobi exposes the 3 APIs.

Allegedly, using GRBsetdblattrarray should be the fastest (than using the list counterpart, than using the element entrywise in a (julia) loop).
But the array API only exposes a start and a len arg. So it’s probably only effective for variables with a contiguous index pattern.

So I wonder if JuMP.jl (based on Gurobi.jl) can ensure the contiguous pattern when creating JuMP variables? e.g.

JuMP.@variable(m, x[2:3, [4]])
# some other code
y = JuMP.@variable(m, [i = 1:5, j = i:5, u = (0, 1)])

can I expect that the x and y has a contiguous index pattern in the Gurobi solver? (The order in julia is x -> y, and intra-x it’s for i in x, intra-y it’s for i in y).

A related question is,
considering this API

function GRBsetdblattrarray(model, attrname, first, len, newvalues)
    ccall((:GRBsetdblattrarray, libgurobi), Cint, (Ptr{GRBmodel}, Ptr{Cchar}, Cint, Cint, Ptr{Cdouble}), model, attrname, first, len, newvalues)
end

in julia if I call the above API, I need to input a len (e.g. 3).

Do I have to input Cint(3) (meaning that I cannot input 3 directly)? or will julia auto-convert that for me so I can input 3 directly?