"Neal H. Walfield" <[EMAIL PROTECTED]> writes:
> I am not entirely clear what you intend. Do you want to apply this
> technique to hurd_cap_obj_t and hurd_cap_class_t?
I was trying to address the question of how to allow caller object
allocation while not exposing data structures. In your previous
example, you mentioned that this would be needed for `struct
hurd_cap_ctx_cap_use' and you suggested that this could be achieved by
defining a function that returns the size of this data structure:
struct hurd_cap_ctx_cap_use *cap_ctx = alloca (hurd_cap_ctx_size ());
I'm just saying that instead of making an actual function call (not
inlined) to `hurd_cap_ctx_size ()', the caller could do something like:
struct hurd_cap_ctx_cap_use *cap_ctx =
alloca (hurd_class_instance_size (&hurd_cap_ctx_cap_use_class));
And this even saves a function call since `hurd_class_instance_size ()'
can be inlined.
Hope this makes sense,
Ludovic.
_______________________________________________
L4-hurd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/l4-hurd