Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000447OCamlCamlIDLpublic2001-07-21 22:222001-07-30 09:30
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000447: camlidl: (feature wish) calling conventions for function declaration
DescriptionFull_Name: Dmitry Bely
Version: camlidl current cvs
OS: Windows NT 4.0

Is it possible to specify the non-standard calling convention (e.g. pascal
instead cdecl) for some function, declared in .idl file? I have a
binary-only C-library, that uses pascal calling convention (highly
optimized image processing stuff from Intel), but I cannot find the way of
using it without manual modification of camlidl-generated definitions. If I
have not missed something and that's currently not possible, maybe to add
an IDL attribute for that, say

[calling_convention("__stdcall")] void some_func(....);

and then just insert that string into the generated .h file:

void __stdcall some_func(....);

Or we can go MIDL way -- it recognizes
cdecl,pascal,stdcall,__cdecl,__pascal,__stdcall and maybe other specifiers
as well as C/C++ compiler and puts them into generated .h file (AFAIK it's
not documented though). Probably this way more preferable taking into
account desirable compatibility with MIDL.

It could be very helpful for Windows world (e.g., all Win32 API functions
uses __stdcall). BTW, specifing calling convention via compiler option is
not possible -- caml/camlidl runtime is build using cdecl, so we cannot
redefine it globally...

Hope to hear from you soon,
Dmitry


TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000064)
administrator (administrator)
2001-07-24 10:55

See PR#450 for a workaround.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker