bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: gstep-db EOFaul forward invocation ffcall bug


From: Marko Mikulicic
Subject: PATCH: gstep-db EOFaul forward invocation ffcall bug
Date: Sun, 19 Aug 2001 01:56:04 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010628

I have noticed that ffcall compiled base libs calls directly forwardInvocation: instead of forward::.


This little patch implements forwardInvocation: for EOFault
just like forward::


Marko


*** EOFault.m.orig      Sun Aug 19 01:46:26 2001
--- EOFault.m   Sun Aug 19 01:48:55 2001
***************
*** 34,39 ****
--- 34,41 ----
  #include <Foundation/NSDictionary.h>
  #include <Foundation/NSString.h>
  #include <Foundation/NSObjCRuntime.h>
+ #include <Foundation/NSMethodSignature.h>
+ #include <Foundation/NSInvocation.h>

  #include <extensions/NSException.h>
  #include <extensions/objc-runtime.h>
***************
*** 465,470 ****
--- 467,498 ----
  {
      // Must be here as initialize is called for each root class
      // without asking if it responds to it !
+ }
+
+ - (void)forwardInvocation:(NSInvocation *)anInvocation
+ {
+    EOFaultResolver* resolver = faultResolver;
+
+    // If in class
+    if (!object_is_instance(self)) {
+       THROW([[InvalidArgumentException alloc]
+            initWithFormat:@"EOFault class does not responds to %s'",
+            sel_get_name([anInvocation selector])]);
+    }
+
+    [resolver beforeFault];
+    [resolver fault];
+    [resolver afterFault];
+
+    if (isa == [EOFault class]) {
+       THROW([[InvalidArgumentException alloc]
+            initWithFormat:
+            @"fault error: %@ was not cleared during fault fetching",
+     [resolver description]]);
+    }
+
+    [anInvocation invokeWithTarget: self];
+
  }

  - (retval_t)forward:(SEL)sel :(arglist_t)args




reply via email to

[Prev in Thread] Current Thread [Next in Thread]