开发者社区 问答 正文

objc_msgSend的定义是什么?

objc_msgSend的定义是什么?

展开
收起
游客gwxzsspn6neze 2022-05-12 13:02:32 198 分享 版权
来自: 阿里技术
1 条回答
写回答
取消 提交回答
  • IMP _class_lookupMethodAndLoadCache (Class cls, SEL sel) { ... if (methodPC == NULL) { //! 这里指定消息转发入口 // Class and superclasses do not respond -- use forwarding smt = malloc_zone_malloc (_objc_create_zone(), sizeof(struct objc_method)); smt->method_name = sel; smt->method_types = ""; smt->method_imp = &_objc_msgForward; _cache_fill (cls, smt, sel); methodPC = &_objc_msgForward;
    }

    ... }

    2022-05-12 16:02:10
    赞同 展开评论
问答地址: