]> git.saurik.com Git - cycript.git/blobdiff - sig/types.hpp
Remove and compress some dead code in CYDisplayOutput.
[cycript.git] / sig / types.hpp
index 3e8d1f24749603fe77546ae88200f66dc6dae71a..e6240a11b5f8d888f2001b0660af724f0ae94336 100644 (file)
@@ -1,7 +1,28 @@
+/* Cycript - Optimizing JavaScript Compiler/Runtime
+ * Copyright (C) 2009-2012  Jay Freeman (saurik)
+*/
+
+/* GNU Lesser General Public License, Version 3 {{{ */
+/*
+ * Cycript is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * Cycript is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Cycript.  If not, see <http://www.gnu.org/licenses/>.
+**/
+/* }}} */
+
 #ifndef SIG_TYPES_H
 #define SIG_TYPES_H
 
-#include "minimal/stdlib.h"
+#include "Standard.hpp"
 
 namespace sig {
 
@@ -10,7 +31,8 @@ enum Primitive {
     union_P = '(',
     string_P = '*',
     selector_P = ':',
-    object_P = '@',
+    block_P = '?',
+    object_P = 'W',
     boolean_P = 'B',
     uchar_P = 'C',
     uint_P = 'I',
@@ -62,13 +84,16 @@ struct Type {
         } data;
 
         struct Signature signature;
-        char *extra;
     } data;
 };
 
 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 IsAggregate(Primitive primitive) {
+    return primitive == struct_P || primitive == union_P;
+}
+
 }
 
 #endif/*SIG_TYPES_H*/