[GEN]: peek and multiple indirection

new topic     » topic index » view thread      » older message » newer message

Hello all fellow euphorians,

i seem to have a problem with pointers and `peek( )`. I have this variabl=
e
this is a pointer to a pointer:

// in C

int **multi_indirec;

Back to euphoria. So i have this atom which is a pointer to a pointer. I
tried to `peek( )` this atom so i have just a pointer. This caused a
seqmentation fault. Is this Euphoria's fault or that of my code? Is there=
 any
other way to access the value at the end of the pointer chain?

ex

atom ptr_to_ptr, ptr, value

-- variables now have values/locations

ptr =3D peek( ptr_to_ptr ) -- segmentation fault is here
value =3D peek( { ptr, length( ptr ) } )


What is wrong? Have i missed some basic part of Euphoria that allows for =
this
or what?

Any help is appreciated. Thanks in advance.

--=20
evil, corruption and bad taste
  ^cense

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu