[macruby-changes] [4512] MacRuby/trunk/bs.c
source_changes at macosforge.org
source_changes at macosforge.org
Mon Sep 13 18:28:46 PDT 2010
Revision: 4512
http://trac.macosforge.org/projects/ruby/changeset/4512
Author: lsansonetti at apple.com
Date: 2010-09-13 18:28:43 -0700 (Mon, 13 Sep 2010)
Log Message:
-----------
in 32-bit mode, ignore elements having only type64 attributes
Modified Paths:
--------------
MacRuby/trunk/bs.c
Modified: MacRuby/trunk/bs.c
===================================================================
--- MacRuby/trunk/bs.c 2010-09-13 21:38:09 UTC (rev 4511)
+++ MacRuby/trunk/bs.c 2010-09-14 01:28:43 UTC (rev 4512)
@@ -485,6 +485,16 @@
} \
while (0)
+#if __LP64__
+# define CHECK_TYPE_ATTRIBUTE(var) CHECK_ATTRIBUTE(var, "type")
+#else
+# define CHECK_TYPE_ATTRIBUTE(var) \
+ if (var == NULL && get_type64_attribute(reader) != NULL) { \
+ break; \
+ } \
+ CHECK_ATTRIBUTE(var, "type")
+#endif
+
#define CHECK_ATTRIBUTE_CAN_BE_EMPTY(a, name) \
CHECK_ATTRIBUTE0(a, name, true)
@@ -595,7 +605,7 @@
const_name = get_attribute(reader, "name");
CHECK_ATTRIBUTE(const_name, "name");
const_type = get_type_attribute(reader);
- CHECK_ATTRIBUTE(const_type, "type");
+ CHECK_TYPE_ATTRIBUTE(const_type);
bs_const = (bs_element_constant_t *)
malloc(sizeof(bs_element_constant_t));
@@ -688,7 +698,7 @@
int field_count;
struct_decorated_type = get_type_attribute(reader);
- CHECK_ATTRIBUTE(struct_decorated_type, "type");
+ CHECK_TYPE_ATTRIBUTE(struct_decorated_type);
struct_name = get_attribute(reader, "name");
CHECK_ATTRIBUTE(struct_name, "name");
@@ -731,7 +741,7 @@
opaque_name = get_attribute(reader, "name");
CHECK_ATTRIBUTE(opaque_name, "name");
opaque_type = get_type_attribute(reader);
- CHECK_ATTRIBUTE(opaque_type, "type");
+ CHECK_TYPE_ATTRIBUTE(opaque_type);
bs_opaque =
(bs_element_opaque_t *)malloc(sizeof(bs_element_opaque_t));
@@ -754,7 +764,7 @@
cftype_name = get_attribute(reader, "name");
CHECK_ATTRIBUTE(cftype_name, "name");
cftype_type = get_type_attribute(reader);
- CHECK_ATTRIBUTE(cftype_type, "type");
+ CHECK_TYPE_ATTRIBUTE(cftype_type);
bs_cftype =
(bs_element_cftype_t *)malloc(sizeof(bs_element_cftype_t));
@@ -1041,7 +1051,7 @@
CHECK_ATTRIBUTE(selector, "selector");
method_type = get_type_attribute(reader);
- CHECK_ATTRIBUTE(method_type, "type");
+ CHECK_TYPE_ATTRIBUTE(method_type);
bs_informal_method = (bs_element_informal_protocol_method_t *)
malloc(sizeof(bs_element_informal_protocol_method_t));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100913/c6d8b60a/attachment.html>
More information about the macruby-changes
mailing list