summaryrefslogtreecommitdiff
path: root/byterun/extern.c
diff options
context:
space:
mode:
authorJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2008-01-28 05:29:20 +0000
committerJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2008-01-28 05:29:20 +0000
commit3f4a98da0fbf8a87c674d6737d8c6cec7e8567e5 (patch)
treef5aa13505824d708414ece1f00219b811315c44a /byterun/extern.c
parent30f3fa2c5bc27f8c59930741aa1b6dd5a34a6b40 (diff)
downloadocaml-gcaml3090.tar.gz
3.09.1 updategcaml3090
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml3090@8792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/extern.c')
-rw-r--r--byterun/extern.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/byterun/extern.c b/byterun/extern.c
index a8e367f185..f27a95844c 100644
--- a/byterun/extern.c
+++ b/byterun/extern.c
@@ -144,6 +144,13 @@ static void init_extern_output(void)
extern_limit = extern_output_block->data + SIZE_EXTERN_OUTPUT_BLOCK;
}
+static void close_extern_output(void)
+{
+ if (extern_userprovided_output == NULL){
+ extern_output_block->end = extern_ptr;
+ }
+}
+
static void free_extern_output(void)
{
struct output_block * blk, * nextblk;
@@ -465,7 +472,7 @@ static intnat extern_value(value v, value flags)
/* Marshal the object */
extern_rec(v);
/* Record end of output */
- extern_output_block->end = extern_ptr;
+ close_extern_output();
/* Undo the modifications done on externed blocks */
extern_replay_trail();
/* Write the sizes */