Overview
Comment: | OFBlock is now based on OFObject. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
56393a3fbdf0aa7a405e3342082096e7 |
User & Date: | js on 2010-11-11 21:55:49 |
Other Links: | manifest | tags |
Context
2010-11-11
| ||
22:46 | Fix a typo in configure.ac. check-in: f060cc04eb user: js tags: trunk | |
21:55 | OFBlock is now based on OFObject. check-in: 56393a3fbd user: js tags: trunk | |
20:52 | Ignore BOM at start of string. check-in: 1e7e237e6e user: js tags: trunk | |
Changes
Modified src/OFBlock.h from [78089d079f] to [5c02ac3636].
1 2 3 4 5 6 7 8 9 10 11 | /* * Copyright (c) 2008 - 2010 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ | | < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /* * Copyright (c) 2008 - 2010 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFObject.h" /// \cond internal typedef struct __of_block_literal { Class isa; int flags; int reserved; void (*invoke)(void *, ...); |
︙ | ︙ | |||
65 66 67 68 69 70 71 | # define Block_copy(x) ((__typeof__(x))_Block_copy((const void*)(x))) #endif #ifndef Block_release # define Block_release(x) _Block_release((const void*)(x)) #endif /// \cond internal | | < < < < < < < | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | # define Block_copy(x) ((__typeof__(x))_Block_copy((const void*)(x))) #endif #ifndef Block_release # define Block_release(x) _Block_release((const void*)(x)) #endif /// \cond internal @interface OFBlock: OFObject @end @interface OFStackBlock: OFBlock @end @interface OFGlobalBlock: OFBlock @end @interface OFMallocBlock: OFBlock @end /// \endcond |
Modified src/OFBlock.m from [daa6113db1] to [e3fe4dcc30].
︙ | ︙ | |||
228 229 230 231 232 233 234 | break; } } #endif /// \cond internal @implementation OFBlock | > > > > > | > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | break; } } #endif /// \cond internal @implementation OFBlock + alloc { @throw [OFNotImplementedException newWithClass: self selector: _cmd]; } - init { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } - (void)addMemoryToPool: (void*)ptr { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } - (void*)allocMemoryWithSize: (size_t)size { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } - (void*)allocMemoryForNItems: (size_t)nitems withSize: (size_t)size { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } - (void*)resizeMemory: (void*)ptr toSize: (size_t)size { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } - (void*)resizeMemory: (void*)ptr toNItems: (size_t)nitems withSize: (size_t)size { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } - (void)freeMemory: (void*)ptr { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } - retain { if (isa == (Class)&_NSConcreteMallocBlock) return Block_copy(self); return self; } - copy { return Block_copy(self); } - (size_t)retainCount { if (isa == (Class)&_NSConcreteMallocBlock) return ((of_block_literal_t*)self)->reserved; return SIZE_MAX; } - (void)release { Block_release(self); } - (void)dealloc { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; [super dealloc]; /* Get rid of a stupid warning */ } @end #if !defined(OF_GNU_RUNTIME) && !defined(OF_OBJFW_RUNTIME) @implementation OFStackBlock @end @implementation OFGlobalBlock @end @implementation OFMallocBlock @end #endif /// \endcond |