]> git.saurik.com Git - cycript.git/blobdiff - sig/types.hpp
Fix issue in 64-bit choose() reported by heardrwt.
[cycript.git] / sig / types.hpp
index d2367af92be5e21c4db0e824ad6a61cb3b6611d2..1c8b94db8bf009e9a79b1a2d2b00b1e28cf18ce4 100644 (file)
 namespace sig {
 
 enum Primitive {
+    function_P = '\0',
+    block_P = '\a',
+
+    unknown_P = '?',
     typename_P = '#',
     union_P = '(',
     string_P = '*',
     selector_P = ':',
-    block_P = '?',
     object_P = 'W',
     boolean_P = 'B',
     uchar_P = 'C',
@@ -93,6 +96,10 @@ struct Type {
 struct Type *joc_parse_type(char **name, char eos, bool variable, bool signature);
 void joc_parse_signature(struct Signature *signature, char **name, char eos, bool variable);
 
+_finline bool IsFunctional(Primitive primitive) {
+    return primitive == block_P || primitive == function_P;
+}
+
 _finline bool IsAggregate(Primitive primitive) {
     return primitive == struct_P || primitive == union_P;
 }