Update Function Object interface

to make interface trivially copiable

There is no need to perform a copy-protected type as there is no init/clear for this type.
It is always created through an instance.
This commit is contained in:
Patrick Pelissier committed 2023-12-09 12:40:45 +01:00
1 parent 15492394ad
commit 7bf3ea3a87
3 files changed
+9 -5

No files matched your search

+3 -1
View File
@@ -8008,7 +8008,8 @@ Example:
{
sumint_t s;
sumint_init_with(s, 16);
int n = f(sumint_as_interface(s));
interface_t interface = sumint_as_interface(s);
int n = f(interface);
printf("sum=%d\n", n);
sumint_clear(s);
}
@@ -8037,6 +8038,7 @@ It will define the following type and functions:
Type representing an interface to such function object.
There is only one method for such type (see below).
It is a pointer to an hidded structure and can be assigned.
##### retcode\_type name\_call(name\_t interface, type\_of\_param1, type\_of\_param 2, ...)