2015-01-09 Dimitris Papavasiliou <dpapavas@gmail.com>
* ivars.c: Add a check for classes without instance
variables, which have a NULL ivar list pointer.
2015-01-09 Dimitris Papavasiliou <dpapavas@gmail.com>
* objc.dg/gnu-api-2-class.m: Add a test case
for the above change.
From-SVN: r219396
+2015-01-09 Dimitris Papavasiliou <dpapavas@gmail.com>
+
+ * objc.dg/gnu-api-2-class.m: Add a test case
+ for the above change.
+
2015-01-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
* gcc.dg/typeof-2.c: Add checks for non-atomic types.
abort ();
}
+ printf ("Testing class_copyIvarList () on class with no instance variables...\n");
+ {
+ unsigned int count;
+ Ivar * list = class_copyIvarList (objc_getClass ("MyOtherSubClass"),
+ &count);
+
+ if (count != 0)
+ abort ();
+
+ if (list != NULL)
+ abort ();
+ }
+
printf ("Testing class_copyMethodList ()...\n");
{
unsigned int count;
+2015-01-09 Dimitris Papavasiliou <dpapavas@gmail.com>
+
+ * ivars.c: Add a check for classes without instance
+ variables, which have a NULL ivar list pointer.
+
2015-01-05 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
struct objc_ivar **returnValue = NULL;
struct objc_ivar_list* ivar_list;
- if (class_ == Nil || CLS_IS_IN_CONSTRUCTION (class_))
+ if (class_ == Nil || CLS_IS_IN_CONSTRUCTION (class_) || !class_->ivars)
{
if (numberOfReturnedIvars)
*numberOfReturnedIvars = 0;