From 589315f77c2ec66b8d9a0beeb4b389637d581225 Mon Sep 17 00:00:00 2001 From: CaS Date: Tue, 31 Dec 2002 10:52:54 +0000 Subject: [PATCH] Document git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15423 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 1 + Source/NSObjCRuntime.m | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/ChangeLog b/ChangeLog index 04f632a67..0329f293e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ * Headers/gnustep/base/NSHashTable.h: Ditto * Tools/AGSHtml.m: Fix typo ... excess semicolon in constant output. * Tools/AGSParser.m: Fix error failing to find comment for constants. + * Source/NSObjCRuntime.m: Document functions. 2002-12-30 Adam Fedor diff --git a/Source/NSObjCRuntime.m b/Source/NSObjCRuntime.m index 0e9d3b655..cfc3f3849 100644 --- a/Source/NSObjCRuntime.m +++ b/Source/NSObjCRuntime.m @@ -32,6 +32,10 @@ #include #include +/** + * Returns a string object containing the method name for + * aSelector. If aSelector is 0, returns nil. + */ NSString * NSStringFromSelector(SEL aSelector) { @@ -40,6 +44,10 @@ NSStringFromSelector(SEL aSelector) return nil; } +/** + * Returns a selector for the method whose name is supplied in the + * aSelectorName argument, or 0 if a nil string is supplied. + */ SEL NSSelectorFromString(NSString *aSelectorName) { @@ -48,6 +56,10 @@ NSSelectorFromString(NSString *aSelectorName) return (SEL)0; } +/** + * Returns the class whose name is supplied in the + * aClassName argument, or 0 if a nil string is supplied. + */ Class NSClassFromString(NSString *aClassName) { @@ -56,6 +68,10 @@ NSClassFromString(NSString *aClassName) return (Class)0; } +/** + * Returns an [NSString] object containing the class name for + * aClass. If aClass is 0, returns nil. + */ NSString * NSStringFromClass(Class aClass) { @@ -64,6 +80,14 @@ NSStringFromClass(Class aClass) return nil; } +/** + * When provided with a C string containing encoded type information, + * this method extracts size and alignment information for the specified + * type into the buffers pointed to by sizep and alignp.
+ * If either sizep or alignp is a nil pointer, the corresponding data is + * not extracted.
+ * The function returns a pointer to the type information C string. + */ const char * NSGetSizeAndAlignment(const char *typePtr, unsigned *sizep, unsigned *alignp) {