(OBJC_GEN_METHOD_LABEL): Convert colons to _'s.

Don't use the category name or the number.

From-SVN: r3691
This commit is contained in:
Richard Stallman 1993-03-10 07:19:29 +00:00
parent ac50959202
commit 7bbc643254
1 changed files with 9 additions and 5 deletions

View File

@ -55,15 +55,19 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif #endif
/* This is the default way of generating a method name. */ /* 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 #ifndef OBJC_GEN_METHOD_LABEL
#define OBJC_GEN_METHOD_LABEL(BUF, IS_INST, CLASS_NAME, CAT_NAME, SEL_NAME, NUM) \ #define OBJC_GEN_METHOD_LABEL(BUF, IS_INST, CLASS_NAME, CAT_NAME, SEL_NAME, NUM) \
do { \ do { \
char *cat_name = (CAT_NAME); \ char *temp; \
if (cat_name == 0) cat_name = ""; \ sprintf ((BUF), "_%s_%s_%s", \
sprintf ((BUF), "_%s_%s_%s_%s_%d", \
((IS_INST) ? "i" : "c"), \ ((IS_INST) ? "i" : "c"), \
(CLASS_NAME), cat_name, \ (CLASS_NAME), \
(SEL_NAME), (NUM)); \ (SEL_NAME)); \
for (temp = (BUF); *temp; temp++) \
if (*temp == ':') *temp = '_'; \
} while (0) } while (0)
#endif #endif