Changeset 03cad47 in mainline for uspace/app/bithenge/transform.h


Ignore:
Timestamp:
2012-07-28T00:20:31Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4056ad0
Parents:
6e34bd0
Message:

Bithenge: make num_params more dynamic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bithenge/transform.h

    r6e34bd0 r03cad47  
    4646        const struct bithenge_transform_ops *ops;
    4747        unsigned int refs;
     48        int num_params;
    4849} bithenge_transform_t;
    4950
     
    6667         * @param self The transform. */
    6768        void (*destroy)(bithenge_transform_t *self);
    68         /** The number of parameters required. */
    69         int num_params;
    7069} bithenge_transform_ops_t;
    7170
     
    136135}
    137136
    138 /** Get the number of parameters required by a transform. Takes ownership of
    139  * nothing.
     137/** Get the number of parameters required by a transform. This number is used
     138 * by the parser and param-wrapper. Takes ownership of nothing.
    140139 * @param self The transform.
    141140 * @return The number of parameters required. */
     
    143142{
    144143        assert(self);
    145         assert(self->ops);
    146         return self->ops->num_params;
     144        return self->num_params;
    147145}
    148146
     
    220218
    221219int bithenge_init_transform(bithenge_transform_t *self,
    222     const bithenge_transform_ops_t *ops);
     220    const bithenge_transform_ops_t *ops, int num_params);
    223221int bithenge_new_struct(bithenge_transform_t **out,
    224222    bithenge_named_transform_t *subtransforms);
Note: See TracChangeset for help on using the changeset viewer.