aboutsummaryrefslogtreecommitdiff
path: root/DebugUtils
diff options
context:
space:
mode:
authorGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-07-29 15:07:07 +0000
committerGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-07-29 15:07:07 +0000
commit43982f07ba6a0a9839e32e774855c9d2068e9d5e (patch)
tree238f1a607b086c036be1f05cc760dd332f70ecfb /DebugUtils
parent4963c8a9d57501b5ffb0fe52fbfe60cd71b3b916 (diff)
fix a bug w/ method check support.
mark part of the logger+asl code as not feasible for testing. work around a unittesting marco catch w/ gc and __weak.
Diffstat (limited to 'DebugUtils')
-rw-r--r--DebugUtils/GTMMethodCheck.h2
-rw-r--r--DebugUtils/GTMMethodCheck.m2
2 files changed, 2 insertions, 2 deletions
diff --git a/DebugUtils/GTMMethodCheck.h b/DebugUtils/GTMMethodCheck.h
index 7a6fe9f..7b0919b 100644
--- a/DebugUtils/GTMMethodCheck.h
+++ b/DebugUtils/GTMMethodCheck.h
@@ -70,7 +70,7 @@ __attribute__ ((constructor, visibility("hidden"))) void GTMMethodCheckMethodChe
// look for GTMMethodCheckMethodChecker to enforce linkage of
// GTMMethodCheck.m.
#define GTM_METHOD_CHECK_INNER_INNER(class, method, line) \
-+ (void)xxGMMethodCheckMethod ## class ## line { \
++ (void)xxGTMMethodCheckMethod ## class ## line { \
void (*addr)() = GTMMethodCheckMethodChecker; \
if (addr && ![class instancesRespondToSelector:@selector(method)] \
&& ![class respondsToSelector:@selector(method)]) { \
diff --git a/DebugUtils/GTMMethodCheck.m b/DebugUtils/GTMMethodCheck.m
index 300022b..ef3ee4a 100644
--- a/DebugUtils/GTMMethodCheck.m
+++ b/DebugUtils/GTMMethodCheck.m
@@ -86,7 +86,7 @@ void GTMMethodCheckMethodChecker(void) {
_GTMDevAssert(classes, @"Unable to allocate memory for classes");
newNumClasses = objc_getClassList(classes, numClasses);
}
- for (i = 0; i < numClasses; ++i) {
+ for (i = 0; i < numClasses && classes; ++i) {
Class cls = classes[i];
// Since we are directly calling objc_msgSend, we need to conform to