From 0ff9a9b170e966ff67925a42b624ffb1fb7daecd Mon Sep 17 00:00:00 2001 From: hmelder Date: Thu, 5 Sep 2024 00:42:19 +0200 Subject: [PATCH] Implement method_getTypedSelector_np --- encoding2.c | 7 +++++++ objc/encoding.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/encoding2.c b/encoding2.c index 5fed3b21..496c8000 100644 --- a/encoding2.c +++ b/encoding2.c @@ -418,6 +418,13 @@ const char *method_getTypeEncoding(Method method) return sel_getType_np(method->selector); } +OBJC_PUBLIC +SEL method_getTypedSelector_np(Method method) +{ + if (NULL == method) { return NULL; } + return method->selector; +} + OBJC_PUBLIC void method_getArgumentType(Method method, unsigned int index, diff --git a/objc/encoding.h b/objc/encoding.h index 5296921e..cfd60437 100644 --- a/objc/encoding.h +++ b/objc/encoding.h @@ -38,6 +38,9 @@ void method_getReturnType(Method method, char *dst, size_t dst_len); OBJC_PUBLIC const char *method_getTypeEncoding(Method method); +OBJC_PUBLIC +SEL method_getTypedSelector_np(Method method) OBJC_NONPORTABLE; + OBJC_PUBLIC void method_getArgumentType(Method method, unsigned int index,