The iofunc_*() default functions operate on the assumption that you've used the default definitions for the context block and the attributes structures. This is a safe assumption for two reasons:
The default structures must be the first members of their respective superstructures, so that the iofunc_*() default functions can access them: