The function signature for tvb_new_child_real_data() requires a const guint8 *, hence the cast in the original code.
Presumably you've changed the type of clear_data, originally this is a char *, to whatever guint8AMIT is, but this will still need to either have an implicit type conversion to the required type, or you have to add an explicit cast.