[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RFA: [base] GSObjCRuntime
From: |
David Ayers |
Subject: |
RFA: [base] GSObjCRuntime |
Date: |
Tue, 25 Mar 2003 13:31:20 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210 |
Hi Richard,
Here is the "official" RFA :-)
The API additions would be:
GS_EXPORT IMP GSObjCGetMethod(Class class, SEL sel); /*Notice I changed
the name again ;-) */
GS_EXPORT IMP GSObjCReplaceMethod(Class class, SEL sel, IMP imp);
I also added some missing includes to GSCategories.h
OK to commit?
2003-03-25 David Ayers <d dot ayers at inode dot at>
* Headers/gnustep/base/GSObjCRuntime.h
* Source/Additions/GSObjCRuntime.m (GSObjCGetMethod),
(GSObjCReplaceMethod): Added new functions.
* Source/Additions/GSObjCRuntime.m (search_for_method_in_class):
Renamed static function for NeXT runtime to better reflect
reality.
(GSObjCAddMethods): Updated usage.
(search_for_method_in_class): New static function for GNU runtime.
(flush_method_cache_for_class): New function.
* Headers/gnustep/base/GSCategories.h: Included necessary headers.
? core/base/SSL/SSL.bundle
? core/base/SSL/config.log
? core/base/SSL/config.mak
? core/base/SSL/config.status
? core/base/SSL/ix86
? core/base/SSL/shared_obj
? core/base/Source/Additions/shared_obj
? core/base/Tools/make_strings/shared_obj
Index: core/base/ChangeLog
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/base/ChangeLog,v
retrieving revision 1.1787
diff -u -r1.1787 ChangeLog
--- core/base/ChangeLog 25 Mar 2003 10:03:43 -0000 1.1787
+++ core/base/ChangeLog 25 Mar 2003 12:26:17 -0000
@@ -7,14 +7,15 @@
2003-03-25 David Ayers <address@hidden>
* Headers/gnustep/base/GSObjCRuntime.h
- * Source/Additions/GSObjCRuntime.m (GSObjCReplaceImplementation):
- Added new function.
+ * Source/Additions/GSObjCRuntime.m (GSObjCGetMethod),
+ (GSObjCReplaceMethod): Added new functions.
* Source/Additions/GSObjCRuntime.m (search_for_method_in_class):
Renamed static function for NeXT runtime to better reflect
reality.
(GSObjCAddMethods): Updated usage.
(search_for_method_in_class): New static function for GNU runtime.
(flush_method_cache_for_class): New function.
+ * Headers/gnustep/base/GSCategories-h: Included necessary headers.
2003-03-23 Richard Frith-Macdonald <address@hidden>
Index: core/base/Headers/gnustep/base/GSCategories.h
===================================================================
RCS file:
/cvsroot/gnustep/gnustep/core/base/Headers/gnustep/base/GSCategories.h,v
retrieving revision 1.6
diff -u -r1.6 GSCategories.h
--- core/base/Headers/gnustep/base/GSCategories.h 31 Jan 2003 18:25:41
-0000 1.6
+++ core/base/Headers/gnustep/base/GSCategories.h 25 Mar 2003 12:26:17
-0000
@@ -28,7 +28,11 @@
#ifndef NO_GNUSTEP
-#ifdef NeXT_Foundation_LIBRARY
+#ifndef NeXT_Foundation_LIBRARY
+#include <Foundation/NSCalendarDate.h>
+#include <Foundation/NSData.h>
+#include <Foundation/NSString.h>
+#else
#include <Foundation/Foundation.h>
#endif
Index: core/base/Headers/gnustep/base/GSObjCRuntime.h
===================================================================
RCS file:
/cvsroot/gnustep/gnustep/core/base/Headers/gnustep/base/GSObjCRuntime.h,v
retrieving revision 1.11
diff -u -r1.11 GSObjCRuntime.h
--- core/base/Headers/gnustep/base/GSObjCRuntime.h 25 Mar 2003 09:49:39
-0000 1.11
+++ core/base/Headers/gnustep/base/GSObjCRuntime.h 25 Mar 2003 12:26:17
-0000
@@ -83,7 +83,8 @@
GS_EXPORT NSArray* GSObjCVariableNames(id obj);
GS_EXPORT void GSObjCAddClassBehavior(Class receiver, Class behavior);
-GS_EXPORT IMP GSObjCReplaceImplementation(Class class, SEL sel, IMP imp);
+GS_EXPORT IMP GSObjCGetMethod(Class class, SEL sel);
+GS_EXPORT IMP GSObjCReplaceMethod(Class class, SEL sel, IMP imp);
GS_EXPORT NSValue*
GSObjCMakeClass(NSString *name, NSString *superName, NSDictionary *iVars);
Index: core/base/Source/Additions/GSObjCRuntime.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/base/Source/Additions/GSObjCRuntime.m,v
retrieving revision 1.14
diff -u -r1.14 GSObjCRuntime.m
--- core/base/Source/Additions/GSObjCRuntime.m 25 Mar 2003 10:03:19 -0000
1.14
+++ core/base/Source/Additions/GSObjCRuntime.m 25 Mar 2003 12:26:18 -0000
@@ -671,7 +671,24 @@
}
IMP
-GSObjCReplaceImplementation (Class class, SEL sel, IMP imp)
+GSObjCGetMethod (Class class, SEL sel)
+{
+ struct objc_method *method;
+ IMP imp;
+
+ imp = NULL;
+ method = search_for_method_in_class (class, sel);
+
+ if (method != NULL)
+ {
+ imp = method->method_imp;
+ }
+
+ return imp;
+}
+
+IMP
+GSObjCReplaceMethod (Class class, SEL sel, IMP imp)
{
struct objc_method *method;
IMP oImp;
- RFA: [base] GSObjCRuntime,
David Ayers <=