X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/02873b722f8aed4f64b6ed533f1fa4c0eae457f7..e7ff015817107dbac9373c19ce851178e4f3c791:/Decode.cpp diff --git a/Decode.cpp b/Decode.cpp index f99f61f..9cb165c 100644 --- a/Decode.cpp +++ b/Decode.cpp @@ -38,7 +38,14 @@ CYTypedIdentifier *Decode_(CYPool &pool, struct sig::Type *type) { case sig::union_P: _assert(false); break; case sig::string_P: return $ CYTypedIdentifier($V("char"), $ CYTypePointerTo()); case sig::selector_P: return $ CYTypedIdentifier($V("SEL")); - case sig::block_P: _assert(false); break; + + case sig::block_P: { + _assert(type->data.signature.count != 0); + CYTypedParameter *parameter(NULL); + for (size_t i(type->data.signature.count - 1); i != 0; --i) + parameter = $ CYTypedParameter(Decode(pool, type->data.signature.elements[i].type), parameter); + return Decode(pool, type->data.signature.elements[0].type)->Modify($ CYTypeBlockWith(parameter)); + } break; case sig::object_P: { if (type->name == NULL)