summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-05 20:03:28 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-05 20:03:28 (GMT)
commit697a45b196c606147997372c20d14c6b2eccdda4 (patch)
tree48a14a6bc772db3577eb20287967b22901c06754 /dln.c
parentc9ed212b9e74f71fb3137c72c80e37088de59c95 (diff)
* dln.c (init_funcname_len): ignore rest from first dot.
[ruby-dev:41774] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dln.c b/dln.c
index 9267f11..961592d 100644
--- a/dln.c
+++ b/dln.c
@@ -126,12 +126,12 @@ init_funcname_len(const char **file)
/* Load the file as an object one */
for (base = p; *p; p++) { /* Find position of last '/' */
- if (*p == '.') dot = p;
- if (isdirsep(*p)) base = p+1;
+ if (*p == '.' && !dot) dot = p;
+ if (isdirsep(*p)) base = p+1, dot = NULL;
}
*file = base;
/* Delete suffix if it exists */
- return (dot && dot > base ? dot : p) - base;
+ return (dot ? dot : p) - base;
}
static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX;