mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix occasional crash with proxies
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31291 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
532062f01e
commit
d317aab108
2 changed files with 18 additions and 10 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,13 +1,16 @@
|
|||
2010-09-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* NSSocketPort.m:
|
||||
* unix/GSRunLoopCtxt.m:
|
||||
* NSPort.m:
|
||||
* NSMessagePort.m:
|
||||
* win32/GSRunLoopCtxt.m:
|
||||
* Source/NSSocketPort.m:
|
||||
* Source/unix/GSRunLoopCtxt.m:
|
||||
* Source/NSPort.m:
|
||||
* Source/NSMessagePort.m:
|
||||
* Source/win32/GSRunLoopCtxt.m:
|
||||
Remove redundant check for responding to getFds:count: since it's
|
||||
always true. Fix usage of method to correspond to prototype
|
||||
(NSInteger arguments rather than int arguments).
|
||||
* Source/ObjectiveC2/runtime.c: Fix class_getMethodImplementation()
|
||||
and class_getMethodImplementation_stret() so that they don't cause
|
||||
a crash when used with proxies.
|
||||
|
||||
2010-09-09 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
|
|
|
@ -433,18 +433,23 @@ class_getIvarLayout(Class cls)
|
|||
return (char *) cls->ivars;
|
||||
}
|
||||
|
||||
/* For the next two functions ...
|
||||
* It would be nice to use objc_msg_lookup(), but we can't because that
|
||||
* requires an instance rather than a class as its argument. Trying to
|
||||
* pass the address of the class as if it was an instance won't work since
|
||||
* the instance variables will be missing and any forwarding callback used
|
||||
* by a proxy may try to use the instance variables and crash/fail in
|
||||
* interesting ways.
|
||||
*/
|
||||
IMP
|
||||
class_getMethodImplementation(Class cls, SEL name)
|
||||
{
|
||||
struct objc_object_gnu obj = { cls };
|
||||
return (IMP) objc_msg_lookup((id) & obj, name);
|
||||
return (IMP) get_imp(cls, name);
|
||||
}
|
||||
|
||||
IMP
|
||||
class_getMethodImplementation_stret(Class cls, SEL name)
|
||||
{
|
||||
struct objc_object_gnu obj = { cls };
|
||||
return (IMP) objc_msg_lookup((id) & obj, name);
|
||||
return (IMP) get_imp(cls, name);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
Loading…
Reference in a new issue