> I don't get how I'm supposed to use this. It returns a const property (as it
> seems it should) but all the ways to iterate over the contents use a non-const
> argument. Seems pretty useless, which is why I suppose it's not used (and why
> the manpage is totally wrong).
> 
> regards
> john

You're not missing anything: the use of const in this family of interfaces
is totally busted and makes them impossible to use without casting.

Basically just cast away the const from any return values.
scf_simple_app_props_next() has the same problem.  We need to figure out
whether we should un-const these or whether it would be better at this
point to EOL (but keep for binary compat) and replace these interfaces.

My personal view, having written quite a bit of code using the lower-
level interfaces, is that we should replace scf_simple_* because I don't think
they offer the kinds of simplification that is actually useful.

-Mike

-- 
Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/

Reply via email to