From f07c190d3c948de1f3740e8054939815b2b928f3 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 26 Aug 2005 15:11:21 +0000 Subject: [PATCH] Mac OS X: Removed usage of the deprecated function NSIsSymbolNameDefinedInImage --- src/native/macosx/context.m | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/native/macosx/context.m b/src/native/macosx/context.m index 4cc669d5..093057b0 100644 --- a/src/native/macosx/context.m +++ b/src/native/macosx/context.m @@ -51,14 +51,11 @@ void *extgl_GetProcAddress(const char *name) char mach_name[BUFFER_SIZE] = "_"; strncat(mach_name, name, BUFFER_SIZE - 1); - if (NSIsSymbolNameDefinedInImage(opengl_lib_handle, mach_name)) { - NSSymbol sym = NSLookupSymbolInImage(opengl_lib_handle, mach_name, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); - void *address = NSAddressOfSymbol(sym); - return address; - } else { + NSSymbol sym = NSLookupSymbolInImage(opengl_lib_handle, mach_name, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); + void *address = NSAddressOfSymbol(sym); + if (address == NULL) printfDebug("Could not locate symbol %s\n", name); - return NULL; - } + return address; } static const struct mach_header *loadImage(const char *lib_name) {