Overview
Comment: | Modernize coding style |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
491b090606ca0dcbd65e6abcf2020f8a |
User & Date: | js on 2018-11-06 21:45:03 |
Other Links: | manifest | tags |
Context
2019-03-16
| ||
22:58 | Use dot syntax check-in: dfb0336763 user: js tags: trunk | |
2018-11-06
| ||
21:45 | Modernize coding style check-in: 491b090606 user: js tags: trunk | |
21:29 | Adjust to ObjFW changes check-in: 5d46842834 user: js tags: trunk | |
Changes
Modified src/PGConnection+Private.h from [78c2e023e3] to [84c2eea1b1].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 | - + | */ #import "PGConnection.h" OF_ASSUME_NONNULL_BEGIN @interface PGConnection () |
Modified src/PGConnection.m from [2b5931631c] to [1ce8286c7a].
︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | + | #import "PGResult.h" #import "PGResult+Private.h" #import "PGConnectionFailedException.h" #import "PGCommandFailedException.h" @implementation PGConnection @synthesize pg_connection = _connection; @synthesize parameters = _parameters; - (void)dealloc { [_parameters release]; [self close]; |
︙ | |||
92 93 94 95 96 97 98 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + | @throw [PGCommandFailedException exceptionWithConnection: self command: command]; } switch (PQresultStatus(result)) { case PGRES_TUPLES_OK: |
︙ | |||
158 159 160 161 162 163 164 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | - + | [self freeMemory: values]; } objc_autoreleasePoolPop(pool); switch (PQresultStatus(result)) { case PGRES_TUPLES_OK: |
︙ | |||
241 242 243 244 245 246 247 | 242 243 244 245 246 247 248 249 | - - - - - | - (void)insertRows: (OFArray OF_GENERIC(OFDictionary *) *)rows intoTable: (OFString *)table { for (OFDictionary *row in rows) [self insertRow: row intoTable: table]; } |
Modified src/PGResult+Private.h from [e9cdf4b915] to [159fb60c68].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + - - + + - + | */ #import "PGResult.h" OF_ASSUME_NONNULL_BEGIN @interface PGResult () @property (readonly, nonatomic) PGresult *pg_result; |
Modified src/PGResult.m from [31133d2ea7] to [879f970757].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + + + - + - + - + | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "PGResult.h" #import "PGResult+Private.h" #import "PGResultRow.h" #import "PGResultRow+Private.h" @implementation PGResult @synthesize pg_result = _result; |
︙ | |||
54 55 56 57 58 59 60 | 57 58 59 60 61 62 63 64 65 66 67 | - + - - - - - | } - (id)objectAtIndex: (size_t)index { if (index > PQntuples(_result)) @throw [OFOutOfRangeException exception]; |
Modified src/PGResultRow+Private.h from [2dc226ea0b] to [54a71cebbe].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + - - + + + | */ #import "PGResultRow.h" OF_ASSUME_NONNULL_BEGIN @interface PGResultRow () |
Modified src/PGResultRow.m from [0a37255b98] to [80d17b4c5e].
︙ | |||
78 79 80 81 82 83 84 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + | - initWithResult: (PGResult *)result row: (int)row { self = [super init]; _result = [result retain]; |
︙ | |||
159 160 161 162 163 164 165 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - + - + | objects[j++] = [OFString stringWithUTF8String: PQfname(_res, state->state + i)]; } state->state += count; state->itemsPtr = objects; |
︙ |
Modified src/exceptions/PGCommandFailedException.h from [764f2a0c2b] to [f143fc5e8c].
︙ | |||
28 29 30 31 32 33 34 35 36 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | + + + - - + + + | @interface PGCommandFailedException: PGException { OFString *_command; } @property (readonly, nonatomic) OFString *command; + (instancetype)exceptionWithConnection: (PGConnection *)connection OF_UNAVAILABLE; + (instancetype)exceptionWithConnection: (PGConnection *)connection command: (OFString *)command; - (instancetype)initWithConnection: (PGConnection *)connection OF_UNAVAILABLE; |
Modified src/exceptions/PGCommandFailedException.m from [e985f3486f] to [4da1ac931d].
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | + + + + + - - + + + + + + + | * POSSIBILITY OF SUCH DAMAGE. */ #import "PGCommandFailedException.h" @implementation PGCommandFailedException @synthesize command = _command; + (instancetype)exceptionWithConnection: (PGConnection *)connection { OF_UNRECOGNIZED_SELECTOR } + (instancetype)exceptionWithConnection: (PGConnection *)connection command: (OFString *)command { return [[[self alloc] initWithConnection: connection command: command] autorelease]; } |
︙ |
Modified src/exceptions/PGException.h from [9dd47748a5] to [9661557133].
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 | - + + | PGConnection *_connection; OFString *_error; } @property (readonly, nonatomic) PGConnection *connection; + (instancetype)exceptionWithConnection: (PGConnection *)connection; |
Modified src/exceptions/PGException.m from [6b0ae0eb82] to [ed6fbdfed3].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + | - initWithConnection: (PGConnection *)connection { self = [super init]; @try { _connection = [connection retain]; _error = [[OFString alloc] |
︙ |