[macruby-changes] [2080] MacRuby/branches/experimental/objc.m

source_changes at macosforge.org source_changes at macosforge.org
Fri Jul 24 23:40:22 PDT 2009


Revision: 2080
          http://trac.macosforge.org/projects/ruby/changeset/2080
Author:   vincent.isambart at gmail.com
Date:     2009-07-24 23:40:22 -0700 (Fri, 24 Jul 2009)
Log Message:
-----------
corrected a bug with dladdr in Leopard

Modified Paths:
--------------
    MacRuby/branches/experimental/objc.m

Modified: MacRuby/branches/experimental/objc.m
===================================================================
--- MacRuby/branches/experimental/objc.m	2009-07-25 05:52:26 UTC (rev 2079)
+++ MacRuby/branches/experimental/objc.m	2009-07-25 06:40:22 UTC (rev 2080)
@@ -161,13 +161,15 @@
 {
     Dl_info info;
     if (dladdr(addr, &info) != 0) {
-	if (start != NULL) {
-	    *start = info.dli_saddr;
+	if (info.dli_saddr != NULL) {
+	    if (start != NULL) {
+		*start = info.dli_saddr;
+	    }
+	    if (name != NULL) {
+		strncpy(name, info.dli_sname, name_len);
+	    }
+	    return true;
 	}
-	if (name != NULL) {
-	    strncpy(name, info.dli_sname, name_len);
-	}
-	return true;
     }
 
 #if 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090724/479e32a8/attachment-0001.html>


More information about the macruby-changes mailing list