mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-21 02:41:07 +00:00
Avoid bug in some compiler versions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@24875 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4387c9dc61
commit
9f29820b2b
1 changed files with 6 additions and 6 deletions
12
SQLClient.m
12
SQLClient.m
|
@ -285,7 +285,7 @@ typedef struct {
|
|||
@defs(SQLTransaction);
|
||||
} *TDefs;
|
||||
|
||||
@class _SQLRecord;
|
||||
@class _ConcreteSQLRecord;
|
||||
static Class rClass = 0;
|
||||
|
||||
@implementation SQLRecord
|
||||
|
@ -301,7 +301,7 @@ static Class rClass = 0;
|
|||
if (null == nil)
|
||||
{
|
||||
null = [NSNull new];
|
||||
rClass = [_SQLRecord class];
|
||||
rClass = [_ConcreteSQLRecord class];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -505,21 +505,21 @@ static Class rClass = 0;
|
|||
@end
|
||||
|
||||
|
||||
@interface _SQLRecord : SQLRecord
|
||||
@interface _ConcreteSQLRecord : SQLRecord
|
||||
{
|
||||
unsigned count;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation _SQLRecord
|
||||
@implementation _ConcreteSQLRecord
|
||||
|
||||
+ (id) newWithValues: (id*)v keys: (NSString**)k count: (unsigned int)c
|
||||
{
|
||||
id *ptr;
|
||||
_SQLRecord *r;
|
||||
_ConcreteSQLRecord *r;
|
||||
unsigned pos;
|
||||
|
||||
r = (_SQLRecord*)NSAllocateObject(self,
|
||||
r = (_ConcreteSQLRecord*)NSAllocateObject(self,
|
||||
c*2*sizeof(id), NSDefaultMallocZone());
|
||||
r->count = c;
|
||||
ptr = ((void*)&(r->count)) + sizeof(r->count);
|
||||
|
|
Loading…
Reference in a new issue