1. ver 4 Question about define_c_func
- Posted by bernie May 28, 2009
- 716 views
If I define a machine function to use CDECL calling (using the PLUS)
Is there any way to verify that the CDECL is really being used ?
No matter how I define the function it returns the same routine_id number ?
When I use the c_func to call the define machine code how does
Euphoria know how to call the function where is that calling
information kept track of ?
Does a c_func need to use the plus sign when calling ?
The latest manual entries are confusing concerning define_c_func
Using x parameter ( no x ); using c_proc to call define_c_func; etc.
2. Re: ver 4 Question about define_c_func
- Posted by jimcbrown (admin) May 28, 2009
- 730 views
If I define a machine function to use CDECL calling (using the PLUS)
Is there any way to verify that the CDECL is really being used ?
No.
No matter how I define the function it returns the same routine_id number ?
Correct. The numbers are just entries in a list, first entry gets zero, second gets one, third gets two, etc.
When I use the c_func to call the define machine code how does
Euphoria know how to call the function where is that calling
information kept track of ?
This is done in be_callc.c, look for "cdecl".
Does a c_func need to use the plus sign when calling ?
No. Once defined, this information is remembered in the internal structures.
The latest manual entries are confusing concerning define_c_func
Using x parameter ( no x ); using c_proc to call define_c_func; etc.