From 3508ab6ccf3d480f32ec10b635b774c5d9edbf87 Mon Sep 17 00:00:00 2001 From: theraven Date: Thu, 26 May 2011 14:24:36 +0000 Subject: [PATCH] Fixed ABI compatibility test. --- abi_version.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/abi_version.c b/abi_version.c index 2a6a151..5321d57 100644 --- a/abi_version.c +++ b/abi_version.c @@ -67,12 +67,12 @@ static BOOL endsWith(const char *string, const char *suffix) { if (NULL == string) { return NO; } char *interior = strstr(string, suffix); - return (interior && (strlen(string) == strlen(interior))); + return (interior && (strlen(suffix) == strlen(interior))); } PRIVATE BOOL objc_check_abi_version(struct objc_module_abi_8 *module) { - static int runtime_modules = 3; + static int runtime_modules = 4; // As a quick and ugly hack, skip these three tests for the .m files in the // runtime. They should (in theory, at least) be aware of the GC mode and // behave accordingly. @@ -80,6 +80,7 @@ PRIVATE BOOL objc_check_abi_version(struct objc_module_abi_8 *module) { if (endsWith(module->name, "properties.m") || endsWith(module->name, "associate.m") || + endsWith(module->name, "blocks_runtime.m") || endsWith(module->name, "Protocol2.m")) { runtime_modules--;