* [Caml-list] how to perform an inline assignation to a value containing an int32
@ 2001-10-03 7:34 Sylvain Kerjean
2001-10-08 13:29 ` Xavier Leroy
0 siblings, 1 reply; 2+ messages in thread
From: Sylvain Kerjean @ 2001-10-03 7:34 UTC (permalink / raw)
To: caml-list
i tried Int32_val(v) = v'
but i am not sure that Int32_val() is a valid pointer.
--
Sylvain Kerjean
IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 75 99, Fax: +33 (0) 2 99 84 71 71
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] how to perform an inline assignation to a value containing an int32
2001-10-03 7:34 [Caml-list] how to perform an inline assignation to a value containing an int32 Sylvain Kerjean
@ 2001-10-08 13:29 ` Xavier Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2001-10-08 13:29 UTC (permalink / raw)
To: Sylvain Kerjean; +Cc: caml-list
> i tried Int32_val(v) = v'
Yes, you can do that. Int32_val(v) is a l-value as well as a r-value,
in C parlance. Still, the Caml type int32 is normally immutable, so
it might be cleaner to allocate a fresh int32 using copy_int32(v').
- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-10-08 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-03 7:34 [Caml-list] how to perform an inline assignation to a value containing an int32 Sylvain Kerjean
2001-10-08 13:29 ` Xavier Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox