You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: