summaryrefslogtreecommitdiff
path: root/bytecomp/bytesections.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2001-08-28 14:47:48 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2001-08-28 14:47:48 +0000
commitddd99c7e5d2f0f8e7364e8521fa7e8308999344e (patch)
tree3c0158d035a52c0cf185c08c3288c3c76d6718d0 /bytecomp/bytesections.ml
parentc345611817d76ccc3bbd02db1f942774220739f9 (diff)
downloadocaml-ddd99c7e5d2f0f8e7364e8521fa7e8308999344e.tar.gz
Chargement dynamique de primitives C
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3677 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'bytecomp/bytesections.ml')
-rw-r--r--bytecomp/bytesections.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/bytecomp/bytesections.ml b/bytecomp/bytesections.ml
index 084d6a043a..a9750cff49 100644
--- a/bytecomp/bytesections.ml
+++ b/bytecomp/bytesections.ml
@@ -78,6 +78,14 @@ let seek_section ic name =
seek_sec (in_channel_length ic - 16 - 8 * List.length !section_table)
!section_table
+(* Return the contents of a section, as a string *)
+
+let read_section ic name =
+ let len = seek_section ic name in
+ let res = String.create len in
+ really_input ic res 0 len;
+ res
+
(* Return the position of the beginning of the first section *)
let pos_first_section ic =