From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q45EBOmJ006601 for ; Sat, 5 May 2012 16:11:24 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUBAI80pU/RVaA2imdsb2JhbABFsmwIIgEBAQoJDRkGI4IMAQEBAwESAiwBGx0BAwELBgULOyIBEQEFARwGEyKHXQEDBgULnA4JA4wkgnOESAoZJw0VQoh2AQULinSGIASVfoERjVE9hA0 X-IronPort-AV: E=Sophos;i="4.75,536,1330902000"; d="scan'208";a="156882489" Received: from mail-pb0-f54.google.com ([209.85.160.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 May 2012 16:11:18 +0200 Received: by pbbro2 with SMTP id ro2so6217067pbb.27 for ; Sat, 05 May 2012 07:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=78tJRNr4oZNsnYJlDYFp33qkXlhrBVxGKOcYpBvx6NA=; b=v34bnIY0znevZ525l416h+E0RozMHVw6ElY/bMMwPXBc5coGnypRfiZzG1ClkFTQyf IPrTbKxWbKNYBig6v9Uol9ou4PlzLGMusl8cmKrMbzNxyuvN/7lVGZB8RSbueavfJMPc xrWs642m8Zwls9xwbRL9tEnw2cJi0wFjs4UwVhqQDh4pyJ7P+yl3L8hgoJYdlQCiwe15 zpfVtCghxBhIlGRyO8LX6fl8UskN/EPiia/m5jazhXL4lQGxczCk92T0ZxQk725VOa3M Qq/07bsV2CAphvLb5YushOgxJiMLV3tDnh1V1I+wS7eaq13hI5/ooWnOXCwlns1w3VhG tbvA== MIME-Version: 1.0 Received: by 10.68.136.69 with SMTP id py5mr3391750pbb.115.1336227076927; Sat, 05 May 2012 07:11:16 -0700 (PDT) Received: by 10.68.228.194 with HTTP; Sat, 5 May 2012 07:11:16 -0700 (PDT) In-Reply-To: <87bom26btv.fsf@frosties.localnet> References: <871un1z8sq.fsf@frosties.localnet> <8762ccqqt0.fsf@frosties.localnet> <87bom26btv.fsf@frosties.localnet> Date: Sat, 5 May 2012 15:11:16 +0100 Message-ID: From: Joel Reymont To: Goswin von Brederlow Cc: Gabriel Scherer , caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] using modules to wrap c++ classes On Sat, May 5, 2012 at 1:39 PM, Goswin von Brederlow wrote: > Don't you have to use caml_modify() here instead of Store_field()? I > think Store_field is only alowed in freshly allocated blocks. Store_field uses caml_modify behind the scenes. /* convenience macro */ #define Store_field(block, offset, val) do{ \ mlsize_t caml__temp_offset = (offset); \ value caml__temp_val = (val); \ caml_modify (&Field ((block), caml__temp_offset), caml__temp_val); \ }while(0) -------------------------------------------------------------------------- Working on AlgoKit, a new algorithmic trading platform using Rithmic R|API ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------