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

"ignore" attribute doesn't work for function's arguments #4936

Closed
vicuna opened this issue Dec 10, 2009 · 1 comment

Comments

@vicuna
Copy link

@vicuna vicuna commented Dec 10, 2009

Original bug ID: 4936
Reporter: Dmitry Grebeniuk
Status: closed (set by @xavierleroy on 2011-12-17T08:28:07Z)
Resolution: won't fix
Priority: normal
Severity: minor
Category: -for CamlIDL use https://github.com/xavierleroy/camlidl/issues

Bug description

I have an .idl file with the following contents:

=========
void func( [in,ignore] void* param , int x );

After processing this file with "camlidl test.idl" I get following C stub code:

=========
value camlidl_test_func(
value _v_x)
{
void *param; /in/
int x; /in/
x = Int_val(_v_x);
func(param, x);
return Val_unit;
}

This contradicts the documentation ( http://caml.inria.fr/pub/old_caml_site/camlidl/htmlman/main003.html ), section "3.2 Pointers":
"IDL pointers of kind ignore denote struct fields and function parameters that need not be exposed in the Caml code. Those pointers are simply set to null when converting from Caml to C, and ignored when converting from C to Caml. They cannot occur elsewhere."
Argument "param" was not set to NULL in the C code.
It would be convenient to have an ability to ignore function's arguments setting them to NULL, so, it's more preferrable to fix the code than to fix the documentation.

@vicuna

This comment has been minimized.

Copy link
Author

@vicuna vicuna commented Dec 17, 2011

Comment author: @xavierleroy

I'm closing this PR because CamlIDL has been dormant since 2004. It now lives (or at least sleeps) on http://forge.ocamlcore.org/projects/camlidl/ [^] . Anyone who still cares about CamlIDL after all these years is welcome to join the project on forge.ocamlcore.org and breathe some life in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.