mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-19 10:00:59 +00:00
tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@40469 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
552d190f31
commit
fe7d8e2d9e
1 changed files with 27 additions and 20 deletions
47
SQLClient.m
47
SQLClient.m
|
@ -993,6 +993,7 @@ static int poolConnections = 0;
|
|||
if (Nil == LitStringClass)
|
||||
{
|
||||
Class root = [NSObject class];
|
||||
IMP imp;
|
||||
SEL sel;
|
||||
|
||||
/* Find the literal string class used by the foundation library.
|
||||
|
@ -1009,39 +1010,45 @@ static int poolConnections = 0;
|
|||
* literal string doesn't get retained/released.
|
||||
*/
|
||||
|
||||
sel = @selector(retain);
|
||||
class_addMethod(SQLStringClass, sel,
|
||||
class_getMethodImplementation(root, sel),
|
||||
method_getTypeEncoding(class_getInstanceMethod(root, sel)));
|
||||
#define enc \
|
||||
method_getTypeEncoding(class_getInstanceMethod(SQLStringClass, sel))
|
||||
|
||||
sel = @selector(release);
|
||||
class_addMethod(SQLStringClass, sel,
|
||||
class_getMethodImplementation(root, sel),
|
||||
method_getTypeEncoding(class_getInstanceMethod(root, sel)));
|
||||
imp = class_getMethodImplementation(root, sel);
|
||||
class_addMethod(SQLStringClass, sel, imp, enc);
|
||||
NSAssert(imp == [SQLStringClass instanceMethodForSelector: sel],
|
||||
NSInternalInconsistencyException);
|
||||
|
||||
sel = @selector(autorelease);
|
||||
class_addMethod(SQLStringClass, sel,
|
||||
class_getMethodImplementation(root, sel),
|
||||
method_getTypeEncoding(class_getInstanceMethod(root, sel)));
|
||||
imp = class_getMethodImplementation(root, sel);
|
||||
class_addMethod(SQLStringClass, sel, imp, enc);
|
||||
NSAssert(imp == [SQLStringClass instanceMethodForSelector: sel],
|
||||
NSInternalInconsistencyException);
|
||||
|
||||
sel = @selector(dealloc);
|
||||
class_addMethod(SQLStringClass, sel,
|
||||
class_getMethodImplementation(root, sel),
|
||||
method_getTypeEncoding(class_getInstanceMethod(root, sel)));
|
||||
imp = class_getMethodImplementation(root, sel);
|
||||
class_addMethod(SQLStringClass, sel, imp, enc);
|
||||
NSAssert(imp == [SQLStringClass instanceMethodForSelector: sel],
|
||||
NSInternalInconsistencyException);
|
||||
|
||||
sel = @selector(retain);
|
||||
imp = class_getMethodImplementation(root, sel);
|
||||
class_addMethod(SQLStringClass, sel, imp, enc);
|
||||
NSAssert(imp == [SQLStringClass instanceMethodForSelector: sel],
|
||||
NSInternalInconsistencyException);
|
||||
|
||||
/* The -copy and -copyWithZone: methods should simply retain
|
||||
* the receiver.
|
||||
*/
|
||||
sel = @selector(copy);
|
||||
class_addMethod(SQLStringClass, sel,
|
||||
class_getMethodImplementation(root, @selector(retain)),
|
||||
method_getTypeEncoding(class_getInstanceMethod(root, sel)));
|
||||
class_addMethod(SQLStringClass, sel, imp, enc);
|
||||
NSAssert(imp == [SQLStringClass instanceMethodForSelector: sel],
|
||||
NSInternalInconsistencyException);
|
||||
|
||||
sel = @selector(copyWithZone:);
|
||||
class_addMethod(SQLStringClass, sel,
|
||||
class_getMethodImplementation(root, @selector(retain)),
|
||||
method_getTypeEncoding(class_getInstanceMethod(root, sel)));
|
||||
|
||||
class_addMethod(SQLStringClass, sel, imp, enc);
|
||||
NSAssert(imp == [SQLStringClass instanceMethodForSelector: sel],
|
||||
NSInternalInconsistencyException);
|
||||
}
|
||||
|
||||
if (nil == null)
|
||||
|
|
Loading…
Reference in a new issue