mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-16 08:31:52 +00:00
fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@29034 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
56d6b50af9
commit
9199fa5f6e
10 changed files with 34 additions and 26 deletions
3
ECPG.pgm
3
ECPG.pgm
|
@ -40,6 +40,9 @@
|
|||
#include <Foundation/NSAutoreleasePool.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define SQLCLIENT_PRIVATE @public
|
||||
|
||||
#include "SQLClient.h"
|
||||
|
||||
@interface SQLClientECPG : SQLClient
|
||||
|
|
23
JDBC.m
23
JDBC.m
|
@ -45,19 +45,14 @@
|
|||
#import <Performance/GSTicker.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define SQLCLIENT_PRIVATE @public
|
||||
|
||||
#include "SQLClient.h"
|
||||
|
||||
@interface _JDBCTransaction : SQLTransaction
|
||||
@end
|
||||
|
||||
typedef struct {
|
||||
@defs(SQLClient);
|
||||
} *CDefs;
|
||||
|
||||
typedef struct {
|
||||
@defs(_JDBCTransaction);
|
||||
} *TDefs;
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
static NSString *JDBCException = @"SQLClientJDBCException";
|
||||
|
@ -1520,9 +1515,9 @@ static int JDBCVARCHAR = 0;
|
|||
|
||||
- (SQLTransaction*) batch: (BOOL)stopOnFailure
|
||||
{
|
||||
TDefs transaction;
|
||||
_JDBCTransaction *transaction;
|
||||
|
||||
transaction = (TDefs)NSAllocateObject([_JDBCTransaction class], 0,
|
||||
transaction = (_JDBCTransaction*)NSAllocateObject([_JDBCTransaction class], 0,
|
||||
NSDefaultMallocZone());
|
||||
|
||||
transaction->_db = [self retain];
|
||||
|
@ -1679,9 +1674,9 @@ static int JDBCVARCHAR = 0;
|
|||
|
||||
- (SQLTransaction*) transaction
|
||||
{
|
||||
TDefs transaction;
|
||||
_JDBCTransaction *transaction;
|
||||
|
||||
transaction = (TDefs)NSAllocateObject([_JDBCTransaction class], 0,
|
||||
transaction = (_JDBCTransaction*)NSAllocateObject([_JDBCTransaction class], 0,
|
||||
NSDefaultMallocZone());
|
||||
|
||||
transaction->_db = [self retain];
|
||||
|
@ -1887,12 +1882,12 @@ static int JDBCVARCHAR = 0;
|
|||
|
||||
(*env)->PopLocalFrame (env, NULL);
|
||||
|
||||
((CDefs)_db)->_lastOperation = GSTickerTimeNow();
|
||||
_db->_lastOperation = GSTickerTimeNow();
|
||||
if (_duration >= 0)
|
||||
{
|
||||
NSTimeInterval d;
|
||||
|
||||
d = ((CDefs)_db)->_lastOperation - start;
|
||||
d = _db->_lastOperation - start;
|
||||
if (d >= _duration)
|
||||
{
|
||||
[_db debug: @"Duration %g for transaction %@",
|
||||
|
|
3
MySQL.m
3
MySQL.m
|
@ -39,6 +39,9 @@
|
|||
#import <Foundation/NSAutoreleasePool.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define SQLCLIENT_PRIVATE @public
|
||||
|
||||
#include "SQLClient.h"
|
||||
|
||||
#include <mysql/mysql.h>
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
#import <Foundation/NSAutoreleasePool.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define SQLCLIENT_PRIVATE @public
|
||||
|
||||
#include "SQLClient.h"
|
||||
|
||||
#include <libpq-fe.h>
|
||||
|
|
|
@ -203,6 +203,10 @@ extern NSString * const SQLClientDidConnectNotification;
|
|||
*/
|
||||
extern NSString * const SQLClientDidDisconnectNotification;
|
||||
|
||||
#if !defined(SQLCLIENT_PRIVATE)
|
||||
#define SQLCLIENT_PRIVATE @private
|
||||
#endif
|
||||
|
||||
/**
|
||||
* <p>An enhanced array to represent a record returned from a query.
|
||||
* You should <em>NOT</em> try to create instances of this class
|
||||
|
@ -348,6 +352,7 @@ extern unsigned SQLClientTimeTick();
|
|||
*/
|
||||
@interface SQLClient : NSObject
|
||||
{
|
||||
SQLCLIENT_PRIVATE
|
||||
void *extra; /** For subclass specific data */
|
||||
NSRecursiveLock *lock; /** Maintain thread-safety */
|
||||
/**
|
||||
|
@ -1242,10 +1247,6 @@ extern unsigned SQLClientTimeTick();
|
|||
- (void) setCacheThread: (NSThread*)aThread;
|
||||
@end
|
||||
|
||||
#if !defined(SQLCLIENT_PRIVATE)
|
||||
#define SQLCLIENT_PRIVATE @private
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The SQLTransaction transaction class provides a convenient mechanism
|
||||
* for grouping together a series of SQL statements to be executed as a
|
||||
|
|
3
SQLite.m
3
SQLite.m
|
@ -41,6 +41,9 @@
|
|||
#import <Foundation/NSValue.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define SQLCLIENT_PRIVATE @public
|
||||
|
||||
#include "SQLClient.h"
|
||||
#include <string.h>
|
||||
#include <sqlite3.h>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
int
|
||||
main()
|
||||
{
|
||||
NSAutoreleasePool pool = [NSAutoreleasePool new];
|
||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||
SQLClient *db;
|
||||
NSUserDefaults *defs;
|
||||
NSMutableArray *records;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
int
|
||||
main()
|
||||
{
|
||||
NSAutoreleasePool pool = [NSAutoreleasePool new];
|
||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||
SQLClient *db;
|
||||
NSUserDefaults *defs;
|
||||
NSMutableArray *records;
|
||||
|
@ -96,7 +96,7 @@ main()
|
|||
NSLog(@"Start producing");
|
||||
for (i = 0; i < 100000; i++)
|
||||
{
|
||||
NSAutoreleasePool arp = [NSAutoreleasePool new];
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSString *destination = [NSString stringWithFormat: @"%d", i];
|
||||
NSString *sid = [NSString stringWithFormat: @"%d", i%100];
|
||||
|
||||
|
@ -112,7 +112,7 @@ main()
|
|||
NSLog(@"Start consuming");
|
||||
for (i = 0; i < 100000;)
|
||||
{
|
||||
NSAutoreleasePool arp = [NSAutoreleasePool new];
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
unsigned count;
|
||||
int j;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
int
|
||||
main()
|
||||
{
|
||||
NSAutoreleasePool pool = [NSAutoreleasePool new];
|
||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||
SQLClient *db;
|
||||
NSUserDefaults *defs;
|
||||
NSMutableArray *records;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
int
|
||||
main()
|
||||
{
|
||||
NSAutoreleasePool pool = [NSAutoreleasePool new];
|
||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||
SQLClient *db;
|
||||
NSUserDefaults *defs;
|
||||
NSMutableArray *records;
|
||||
|
@ -116,7 +116,7 @@ main()
|
|||
NSLog(@"Start producing");
|
||||
for (i = 0; i < 100000; i++)
|
||||
{
|
||||
NSAutoreleasePool arp = [NSAutoreleasePool new];
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSString *destination = [NSString stringWithFormat: @"%d", i];
|
||||
NSString *sid = [NSString stringWithFormat: @"%d", i%100];
|
||||
|
||||
|
@ -132,7 +132,7 @@ main()
|
|||
NSLog(@"Start consuming");
|
||||
for (i = 0; i < 100000;)
|
||||
{
|
||||
NSAutoreleasePool arp = [NSAutoreleasePool new];
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
unsigned count;
|
||||
int j;
|
||||
|
||||
|
|
Loading…
Reference in a new issue