From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 50AAFBC69 for ; Wed, 28 Mar 2007 13:07:54 +0200 (CEST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2SB7rTx004555 for ; Wed, 28 Mar 2007 13:07:54 +0200 Received: by nf-out-0910.google.com with SMTP id a25so3315347nfc for ; Wed, 28 Mar 2007 04:07:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=XrVgeTlTS10MFLmLUr5KN2idYEidGpoSLQawcI+e44oF0LR8kg0yVGadnkSBp1zhmbgGzjXLsvKPyFBbrlmB1FUZuRZq7IIZNd/+LlZ0UbdSpnWiq1DpDPd0PkYH94Wydde42FLd9Da2n2PQ3j99CyJWxaoig6P2d8TuBu/SzlU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=S67najLEd4Jd49UGC8GRQdnE534ztamxWgR0quwsOPXX4TfYa6WXIFMz9EuQG1qQyBk8lN0k2aReH87E63lj/LNFS+8/SA/ZaGefa6VAEy4XwG9K46JuXQTlOvhLaUGAUxvLabrQQ5SzUR5pt38rCwzTXr5SaWlC6PjS3bXE4VY= Received: by 10.82.102.4 with SMTP id z4mr638871bub.1175080073113; Wed, 28 Mar 2007 04:07:53 -0700 (PDT) Received: from ?192.168.1.34? ( [88.7.141.133]) by mx.google.com with ESMTP id z37sm22867209ikz.2007.03.28.04.07.51; Wed, 28 Mar 2007 04:07:52 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <244FC2C3-C439-4960-B32F-D11C8FCBB8B3@gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Caml List From: Joel Reymont Subject: Packaging parser as a library Date: Wed, 28 Mar 2007 12:07:49 +0100 X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 460A4C89.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 460A4C89.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; parser:01 parser:01 ocamlyacc:01 ocaml:01 runtime:01 library:03 library:03 generated:05 initialize:05 uses:06 i'm:09 instance:09 packaging:10 folks:11 should:13 Folks, I have code that uses a parser generated by ocamlyacc. I would like to package the code as a library to be called from C. I'm looking to initialize a single OCaml runtime once and call the code multiple times. Do I need to worry about global state in my code if the C code is single-threaded? Should I assume that only a single instance of my code will be running at any time? Thanks, Joel -- http://wagerlabs.com/