Skip to content

Commit

Permalink
Implement method_getTypedSelector_np
Browse files Browse the repository at this point in the history
  • Loading branch information
hmelder committed Sep 4, 2024
1 parent 164f374 commit 0ff9a9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions encoding2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions objc/encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0ff9a9b

Please sign in to comment.