On Thu, 4 Feb 1999, Jochen Kuepper wrote:
JK> On Don, 04 Feb 1999 Alejandro Aguilar Sierra wrote:
JK>
JK> >In GetInset we do:
JK> >
JK> > MathedInset* p;
JK> > memcpy(&p, &array->bf[pos+1], sizeof(p));
JK> >
JK> >and in the function to insert insets we do (same type of p) :
JK> >
JK> > memcpy(&array->bf[pos+1], &p, sizeof(p));
JK> >
JK> >so it's consistent, hmm.. have you used LyX in your platform without these
JK> >problems before?
JK>
JK> Alejandro,
JK> as I send in before 1.0.0 - do you think these memcpies are save ( Regarding
JK> memory representation ) ? What's about assignments + casts ?
JK> ( Did you receive my patch ? )
Hallo Jochen,
I think they are save, and even saver that a solution with type casts
due to word boundaries. pos+1 does not need to point to a word
boundary, and you might run into trouble if you cast such a pointer,
though it might work on most compilers/systems.
The memory representation does not matter, as they are read and
written with the same method (I hope :-).
Gruß aus Duisburg,
Fred
Fred Hucht, Institute of Theoretical Physics, University of Duisburg, Germany
Email: [EMAIL PROTECTED] http://www.thp.Uni-Duisburg.DE/
"Der Koerper der algebraischen Zahlen ist kein algebraischer Zahlkoerper"
(E. Landau, Zahlentheorie (1927), Satz 718)