Re: Where to find _objc_insertMethods
Re: Where to find _objc_insertMethods
- Subject: Re: Where to find _objc_insertMethods
- From: Bill Greene <email@hidden>
- Date: Mon, 6 Jun 2005 18:11:29 -0400
On 2005-Jun -06 , at 3:15 PM, Greg Parker wrote:
On Jun 6, 2005, at 10:42 AM, Bill Greene wrote:
Greg Parker wrote:
_objc_insertMethods() is a function internal to the Objective-C
runtime. Nothing outside the runtime should be calling it.
You should find the code that uses that function and change it.
To add methods to classes, call class_addMethods() instead.
I'm trying to add support for categories to a non-C-based language.
Will that work for categories? I use class_addMethods() for the
instance and class methods.
Yes, if I understand what you're trying to do. Categories add methods
to classes in the same way that class_addMethods() does. Internally,
both categories and class_addMethods() end up calling
_objc_insertMethods() to do the real work.
Sorry, I misread _objc_add_category in objc-runtime.m. Allow me to
restate my question:
Does the runtime distinguish between methods that are categories and
those that are not? If so, how is it informed of this? My initial
guess was that the objc_category structure in <objc/objc-class.h> had
to be filled in by the compiler much as the objc_method_list structure
must be filled in before calling class_addMethods.
-- Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden