Ok, I need to send a table of texts via Ptr{Ptr{Uint8}} to a C struct and 
on the repl things seam to work well

julia> txt={"aa","bb"};

julia> r=cell(2);

julia> r[1]=pointer(txt[1]);

julia> r[2]=pointer(txt[2]);

julia> pr=pointer(r)
Ptr{Any} @0x0000000082edeeb0

julia> ppr = convert(Ptr{Ptr{Uint8}}, pr)
Ptr{Ptr{UInt8}} @0x0000000082edeeb0

julia> bytestring(pointer_to_array(pr,1)[1])
"aa"

so the first text string was correctly recovers. 

But now if do similar but wrap it in a immutable  (it has to an immutable) 
that implicitly calls the same convert method, the text is lost. 

immutable X
    rec::Ptr{Ptr{Uint8}}
end

julia> tx = X(pr)
X(Ptr{Ptr{UInt8}} @0x0000000082edeeb0)

julia> bytestring(pointer_to_array(tx.rec,1)[1])
"\"?\t"

What am I doing wrong? How else can I create a Ptr{Ptr{UInt8}} of a cell 
array of text strings?

Reply via email to