From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA17924; Fri, 11 May 2001 11:35:49 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA17920 for ; Fri, 11 May 2001 11:35:48 +0200 (MET DST) Received: from relay.rinet.ru (relay.rinet.ru [195.54.192.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f4B9Zjf26373 for ; Fri, 11 May 2001 11:35:46 +0200 (MET DST) Received: (from uucp@localhost) by relay.rinet.ru (8.9.3/8.9.3) with UUCP id NAA17648 for caml-list@inria.fr; Fri, 11 May 2001 13:35:30 +0400 (MSD) X-Envelope-To: caml-list@inria.fr Received: from dialin1.stormoff (DIMA) [192.168.0.129] by stormoff with esmtp (Exim 2.05 #1 (Debian)) id 14y9Ef-00074P-00; Fri, 11 May 2001 13:29:21 +0400 To: caml-list@inria.fr Subject: [Caml-list] bug report: camlidl From: Dmitry Bely Date: 11 May 2001 13:32:22 +0400 Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Excuse me if I'm posting this to the wrong place -- I am new to the caml community. Here is the bug description. Let's consider the following example: --- test.idl --- [ object ] interface IX: IUnknown { HRESULT something(); } [ object, pointer_default(ref) ] interface IY: IUnknown { HRESULT_bool getBool(); HRESULT_bool getIX( [out] IX **p ); } --- end of test.idl --- $ camlidl -header test.idl test.idl $ ocamlc -ccopt /Zi -c -ccopt test.c test.c test.h(43) : error C2061: syntax error : identifier 'HRESULT_bool' ... $ ocamlc -ccopt /Zi -c -ccopt /DHRESULT_bool=HRESULT test.c test.c test.c(76) : warning C4047: 'function' : 'long ' differs in levels of indirection from 'long *' test.c(76) : warning C4024: 'camlidl_c2ml_Com_HRESULT_bool' : different types for formal and actual parameter 1 test.c(76) : warning C4020: 'camlidl_c2ml_Com_HRESULT_bool' : too many actual parameters test.c(100) : warning C4047: 'function' : 'long ' differs in levels of indirection from 'long *' test.c(100) : warning C4024: 'camlidl_c2ml_Com_HRESULT_bool' : different types for formal and actual parameter 1 test.c(100) : warning C4020: 'camlidl_c2ml_Com_HRESULT_bool' : too many actual parameters test.c(126) : warning C4020: 'camlidl_ml2c_Com_HRESULT_bool' : too many actual parameters test.c(147) : warning C4020: 'camlidl_ml2c_Com_HRESULT_bool' : too many actual parameters So the following bugs are obvious: 1. HRESULT_bool (and HRESULT_int) definition is missed in camlidlruntime.h (or camlidl compiler should always generate code with HRESULT instead of them) 2. The way compiler uses camlidl_c2ml_Com_HRESULT_bool() and camlidl_ml2c_Com_HRESULT_bool() does not conform to their definition. Specifically, the generated code implies some context structure parameter while camlidl_*_Com_HRESULT_bool() definitions have no idea about it. Of course, I can easily fix the first problem myself, but in the later case I have to give up -- ocaml internals are still beyond my comprehension. If someone is capable to fix that, I'd be very obliged -- it's currently the real showstopper for me :-( Hope to hear from you soon, Dmitry ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr