Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camlidl: (feature wish) calling conventions for function declaration #2846

Closed
vicuna opened this issue Jul 21, 2001 · 1 comment
Closed

camlidl: (feature wish) calling conventions for function declaration #2846

vicuna opened this issue Jul 21, 2001 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jul 21, 2001

Original bug ID: 447
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: -for CamlIDL use https://github.com/xavierleroy/camlidl/issues

Bug description

Full_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

@vicuna
Copy link
Author

vicuna commented Jul 24, 2001

Comment author: administrator

See #2851 for a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant