Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix issue #3 - properly 'namespace' external C functions

  • Loading branch information...
commit a6ba47f018cf9328a0e84991fabe5011cacae2ff 1 parent 519319e
authored June 12, 2011
10  bsl/c/native.c
@@ -3,7 +3,7 @@
3 3
 #include <caml/alloc.h>
4 4
 #include <caml/memory.h>
5 5
 
6  
-CAMLprim value get_memory_usage() {
  6
+CAMLprim value opaque_get_memory_usage() {
7 7
   CAMLparam0();
8 8
 
9 9
   static struct rusage usage;
@@ -26,7 +26,7 @@ static void uname_init() {
26 26
   return;
27 27
 } 
28 28
 
29  
-CAMLprim value get_sys_sysname() {
  29
+CAMLprim value opaque_get_sys_sysname() {
30 30
   CAMLparam0();
31 31
   CAMLlocal1(str);
32 32
 
@@ -36,7 +36,7 @@ CAMLprim value get_sys_sysname() {
36 36
   CAMLreturn(str);
37 37
 }
38 38
 
39  
-CAMLprim value get_sys_nodename() {
  39
+CAMLprim value opaque_get_sys_nodename() {
40 40
   CAMLparam0();
41 41
   CAMLlocal1(str);
42 42
 
@@ -46,7 +46,7 @@ CAMLprim value get_sys_nodename() {
46 46
   CAMLreturn(str);
47 47
 }
48 48
 
49  
-CAMLprim value get_sys_release() {
  49
+CAMLprim value opaque_get_sys_release() {
50 50
   CAMLparam0();
51 51
   CAMLlocal1(str);
52 52
 
@@ -56,7 +56,7 @@ CAMLprim value get_sys_release() {
56 56
   CAMLreturn(str);
57 57
 }
58 58
 
59  
-CAMLprim value get_sys_machine() {
  59
+CAMLprim value opaque_get_sys_machine() {
60 60
   CAMLparam0();
61 61
   CAMLlocal1(str);
62 62
 
10  bsl/c/native.ml
... ...
@@ -1,14 +1,14 @@
1 1
 ##register get_sys_sysname: -> string
2  
-external get_sys_sysname : unit -> string = "get_sys_sysname"
  2
+external get_sys_sysname : unit -> string = "opaque_get_sys_sysname"
3 3
 
4 4
 ##register get_sys_nodename: -> string
5  
-external get_sys_nodename : unit -> string = "get_sys_nodename"
  5
+external get_sys_nodename : unit -> string = "opaque_get_sys_nodename"
6 6
 
7 7
 ##register get_sys_release: -> string
8  
-external get_sys_release : unit -> string = "get_sys_release"
  8
+external get_sys_release : unit -> string = "opaque_get_sys_release"
9 9
 
10 10
 ##register get_sys_machine: -> string
11  
-external get_sys_machine : unit -> string = "get_sys_machine"
  11
+external get_sys_machine : unit -> string = "opaque_get_sys_machine"
12 12
 
13 13
 ##register get_memory_usage: -> int
14  
-external get_memory_usage : unit -> int = "get_memory_usage"
  14
+external get_memory_usage : unit -> int = "opaque_get_memory_usage"

0 notes on commit a6ba47f

Please sign in to comment.
Something went wrong with that request. Please try again.