Version française
Home     About     Download     Resources     Contact us    
Browse thread
use of camlidl
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Patrick Goldbronn - SYSCO <patrick.goldbronn@c...>
Subject: use of camlidl
Hello, (sorry for bad english)

I have 2 questions about use of camlidl.

1)
I'd like to give the caml name of the interfacing C function :

for example, I have the function :

void NP_do (int n , double val) ;

With camlidl, I get the caml function nP_do: int -> float -> unit ;
I'd like to have the name 'do' (in module np.ml :) )

I see that for typedef with attribute mltype.
I don't see an attribute mlname :(

Can I do such thing ?

2)
I see in documentation (in section 3.7 page 10) 
  value c2ml (ty * input) ;
  void ml2c (value input, ty * output) ;

But in generated C file, I see another argument : 'camlidl_ctx _ctx'

So (after error during compilation) I added camlidl_ctx in function c2ml
and ml2c but I don't use it (of course I don't know what is it :( )

  value c2ml (ty * input, camlidl_ctx _ctx) ;
  void ml2c (value input, ty * output, camlidl_ctx _ctx) ;

That's right nevertheless ?


Thank's for your light :)


-- 
#####################################
# Patrick GOLDBRONN                 #
# CEA - DRN/DMT/SYSCO               #
# CE-Saclay, Bâtiment 460           #
# 91191 GIF/YVETTE CEDEX (FRANCE)   #
#                                   #
# Tél : 01 69 08 73 55              #
# Fax : 01 69 08 96 96              #
#####################################