You can define an equivalent julia type that is the same memory layout as
the passwd struct.  You can read more about it here
<http://julia.readthedocs.org/en/latest/manual/calling-c-and-fortran-code/#type-correspondences>
.
-E

On Wed, Sep 17, 2014 at 1:27 PM, Kuba Roth <[email protected]> wrote:

> Hi,
> Thanks for suggestions.
> So right now I got stuck on the ccall.
> I'm passing to getpwuid a uid (which seems to work) but returns a passwd
> struct.
> How can I extract fields of a C struct in Julia?
>
>
> passwd = ccall( (:getpwuid, "libc"), Ptr{Void}, (Ptr{Uint8},),
> stat(ddd).uid  )
>
> Thanks,
> kuba
>

Reply via email to