You could grab one of the 32-bit binaries to download and use. Would that
work? Otherwise, if you're developing a library, if you do a ccall that
expects an Int32, you just have to make sure you specify the argument types
correctly adn the right calls to convert will be called automatically.
ccall(:foo, libbar), Ptr{Void}, (Int32, Int32), 1, 1)
Even on a 64-bit system with Int64 literals, teh above call will work if
the c function expects to `int`s, because the 1's are wrapped in
convert(Int32, 1).
-Jacob
On Mon, Jun 23, 2014 at 4:57 AM, Tchew Quain <[email protected]>
wrote:
> Hi every body
>
> In julia, all the integer value are Int64 as default. But it is not
> convenient when calling C/Fortran which the defualt int is Int32.
>
> I tried use --int-literals=32 to launch julia. But this option only make
> the literal integer value as int32. And even most intrinsic functions do
> not support Int32, reshape for example.
>
> Is it possible make julia support Int32 as default int type??
>
>
> Quain
>
>