aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-03-10 07:19:29 +0000
committerRichard Stallman <rms@gnu.org>1993-03-10 07:19:29 +0000
commit7bbc6432548b174e720601a42775d7f248e3c9e2 (patch)
tree0d3abb2cbcab416d2f48e3b8b07e77a877a6380e
parentac5095920205d7e1f88480aa2a6a60c9811771d2 (diff)
downloadgcc-7bbc6432548b174e720601a42775d7f248e3c9e2.zip
gcc-7bbc6432548b174e720601a42775d7f248e3c9e2.tar.gz
gcc-7bbc6432548b174e720601a42775d7f248e3c9e2.tar.bz2
(OBJC_GEN_METHOD_LABEL): Convert colons to _'s.
Don't use the category name or the number. From-SVN: r3691
-rw-r--r--gcc/objc/objc-act.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 136d770..e1e7d63 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -55,15 +55,19 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif
/* This is the default way of generating a method name. */
+/* I am not sure it is really correct.
+ Perhaps there's a danger that it will make name conflicts
+ if method names contain underscores. -- rms. */
#ifndef OBJC_GEN_METHOD_LABEL
#define OBJC_GEN_METHOD_LABEL(BUF, IS_INST, CLASS_NAME, CAT_NAME, SEL_NAME, NUM) \
do { \
- char *cat_name = (CAT_NAME); \
- if (cat_name == 0) cat_name = ""; \
- sprintf ((BUF), "_%s_%s_%s_%s_%d", \
+ char *temp; \
+ sprintf ((BUF), "_%s_%s_%s", \
((IS_INST) ? "i" : "c"), \
- (CLASS_NAME), cat_name, \
- (SEL_NAME), (NUM)); \
+ (CLASS_NAME), \
+ (SEL_NAME)); \
+ for (temp = (BUF); *temp; temp++) \
+ if (*temp == ':') *temp = '_'; \
} while (0)
#endif