caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocaml 4.01.0 Marshal dumping on Object
@ 2014-01-29  1:09 Xavier Van de Woestyne
  2014-01-29  7:08 ` ygrek
  0 siblings, 1 reply; 2+ messages in thread
From: Xavier Van de Woestyne @ 2014-01-29  1:09 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

Hi, first, i'm really sorry for my Ugly english.
Actually, i'm working on a little module for Data manipulation.
https://github.com/nukiFW/Oml/blob/master/src/omlDatabase.ml
But I've some problems when I try to serialize an Object :

*Exception: Invalid_argument "output_value: abstract value (outside heap)*

I don't use abstract type, only Object. In my Marshal rules I have use
Marshal.Closures, but it's not working.
Thanks a lot (and happy new year).

-- 
Xavier Van de Woestyne
xavier.vdw@gmail.com - TEL BE : 0474 49 53 83 | TEL FR : 06 73 38 72 84

[-- Attachment #2: Type: text/html, Size: 904 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] ocaml 4.01.0 Marshal dumping on Object
  2014-01-29  1:09 [Caml-list] ocaml 4.01.0 Marshal dumping on Object Xavier Van de Woestyne
@ 2014-01-29  7:08 ` ygrek
  0 siblings, 0 replies; 2+ messages in thread
From: ygrek @ 2014-01-29  7:08 UTC (permalink / raw)
  To: caml-list

On Wed, 29 Jan 2014 02:09:52 +0100
Xavier Van de Woestyne <xavier.vdw@gmail.com> wrote:

> But I've some problems when I try to serialize an Object :
> 
> *Exception: Invalid_argument "output_value: abstract value (outside heap)*

Quoting the manual[1] :

> If flags does not contain Marshal.Closures, marshaling fails when it
> encounters a functional value inside v: only 'pure' data structures,
> containing neither functions nor objects, can safely be transmitted
> between different programs. If flags contains Marshal.Closures,
> functional values will be marshaled as a position in the code of the
> program. In this case, the output of marshaling can only be read back
> in processes that run exactly the same program, with exactly the same
> compiled code. (This is checked at un-marshaling time, using an MD5
> digest of the code transmitted along with the code position.)

I read it as objects are not marshallable at all.

[1]: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Marshal.html

-- 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-29  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-29  1:09 [Caml-list] ocaml 4.01.0 Marshal dumping on Object Xavier Van de Woestyne
2014-01-29  7:08 ` ygrek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).