Richard Frith-MacDonald
5c3acb5693
Fail quietly when asked to read non-existent file
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40188 72102866-910b-0410-8b05-ffd578937521
2016-11-01 21:02:31 +00:00
Richard Frith-MacDonald
1ab80b3f58
Fixes for problems spotted by Wolfgang
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40171 72102866-910b-0410-8b05-ffd578937521
2016-10-24 10:22:43 +00:00
Niels Grewe
3e654a6b09
Fix warnings for compilers without blocks support.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40039 72102866-910b-0410-8b05-ffd578937521
2016-07-27 12:39:59 +00:00
Niels Grewe
2e18a14485
Avoid reallocating objects post-hoc based on the initializer used.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40038 72102866-910b-0410-8b05-ffd578937521
2016-07-27 07:02:42 +00:00
Niels Grewe
1b82abd967
Don't leak the deallocator block
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40037 72102866-910b-0410-8b05-ffd578937521
2016-07-26 23:52:53 +00:00
Niels Grewe
c2be055c3e
Add [NSData initWithBytesNoCopy:length:deallocator:]
...
This new initializer allows customising the deallocation behaviour
through user-supplied blocks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40035 72102866-910b-0410-8b05-ffd578937521
2016-07-26 23:01:11 +00:00
Richard Frith-MacDonald
d40d219015
removal of garbage collection
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39608 72102866-910b-0410-8b05-ffd578937521
2016-03-25 11:15:28 +00:00
Richard Frith-MacDonald
62d2bcbabc
changes for use of _WIN32 define on windows
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39492 72102866-910b-0410-8b05-ffd578937521
2016-03-09 13:16:16 +00:00
Niels Grewe
28c824a78a
Modify the interfaces of all collection classes to be compatible with the
...
new lightweight generics implemenation. (Newer MacOS X/iOS code assuming
the presence of the generics annotations can otherwise not be compiled with
GNUstep). This should be well-behaved under clang and gcc both.
Fix NSCache which was copying the cache keys when it really shouldn't
have. Added a few test cases for eviction behaviour.
Few smaller tweaks to avoid compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39406 72102866-910b-0410-8b05-ffd578937521
2016-02-22 21:04:18 +00:00
Richard Frith-MacDonald
8eb1eb2a3e
Fix for obscure decoding error
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39338 72102866-910b-0410-8b05-ffd578937521
2016-02-04 22:33:19 +00:00
Richard Frith-MacDonald
bf5038e2ac
protect from both old runtime and old compiler
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39042 72102866-910b-0410-8b05-ffd578937521
2015-10-08 09:13:32 +00:00
Richard Frith-MacDonald
f6271e8e48
fixup for old runtime
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39041 72102866-910b-0410-8b05-ffd578937521
2015-10-08 09:04:48 +00:00
Richard Frith-MacDonald
0c5d96eebd
changes intended to allow use of _Bool throughout
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39010 72102866-910b-0410-8b05-ffd578937521
2015-09-22 09:46:10 +00:00
Richard Frith-MacDonald
3b02814665
more updates
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38803 72102866-910b-0410-8b05-ffd578937521
2015-07-16 08:44:15 +00:00
Richard Frith-MacDonald
841ddf78e0
memory usage interrogation
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38799 72102866-910b-0410-8b05-ffd578937521
2015-07-15 14:14:21 +00:00
Richard Frith-MacDonald
8c07ae4a05
Tidy to match conding conventions
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38721 72102866-910b-0410-8b05-ffd578937521
2015-06-30 08:41:38 +00:00
Riccardo Mottola
c5dc2d494d
base64EncodedDataWithOptions, base64EncodedStringWithOptions: first implementation
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38634 72102866-910b-0410-8b05-ffd578937521
2015-06-14 16:17:17 +00:00
Richard Frith-MacDonald
37352097e3
Reproduce OSX padding behavior
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38604 72102866-910b-0410-8b05-ffd578937521
2015-06-08 07:46:02 +00:00
Richard Frith-MacDonald
d187e70974
stricter base64 decoding
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38602 72102866-910b-0410-8b05-ffd578937521
2015-06-08 07:14:38 +00:00
Richard Frith-MacDonald
4bce4d2978
Various updates
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38599 72102866-910b-0410-8b05-ffd578937521
2015-06-04 09:18:52 +00:00
Wolfgang Lux
472d8232b1
Fix leak of open file descriptor in NSData -writeToFile:atomically: on
...
systems where mkstemp is defined.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38344 72102866-910b-0410-8b05-ffd578937521
2015-02-16 17:27:57 +00:00
Richard Frith-MacDonald
3cb7256630
simplify ifdefs
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38335 72102866-910b-0410-8b05-ffd578937521
2015-02-07 10:46:42 +00:00
Richard Frith-MacDonald
56465e049b
TLS fixups
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38015 72102866-910b-0410-8b05-ffd578937521
2014-07-25 12:06:34 +00:00
Gregory John Casamento
762296c513
NSData compilation error correction.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38012 72102866-910b-0410-8b05-ffd578937521
2014-07-25 11:13:44 +00:00
Richard Frith-MacDonald
2ef7040ac3
Add Yavor's lfs patch
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38010 72102866-910b-0410-8b05-ffd578937521
2014-07-25 10:38:20 +00:00
Richard Frith-MacDonald
5244db9446
fix for bug #41626
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37757 72102866-910b-0410-8b05-ffd578937521
2014-03-19 08:26:48 +00:00
Richard Frith-MacDonald
66ec6af49b
avoid possible problem with replacement when there's nothing to do ... we could be unnecessarily checking that a buffer exists when we don't actually need to
...
move anything in it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37537 72102866-910b-0410-8b05-ffd578937521
2014-01-05 17:30:11 +00:00
Richard Frith-MacDonald
2d306c7aa5
fix error in method name used in exception format string
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37536 72102866-910b-0410-8b05-ffd578937521
2014-01-05 17:22:45 +00:00
Richard Frith-MacDonald
ed09c55959
leak detection improvements
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37003 72102866-910b-0410-8b05-ffd578937521
2013-08-22 15:44:54 +00:00
Richard Frith-MacDonald
b2d5fd280c
Changes for 64bit clean printf format strings.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36810 72102866-910b-0410-8b05-ffd578937521
2013-07-03 06:46:41 +00:00
Richard Frith-MacDonald
53a553fb47
fix minor error in last NSData edit, some other minor issues,
...
and avoid more false positives.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36536 72102866-910b-0410-8b05-ffd578937521
2013-04-15 07:00:42 +00:00
Richard Frith-MacDonald
e1271866b4
More tweaks to avoid warnings (minor memory leak fixed in HTMLLinker.m)
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36535 72102866-910b-0410-8b05-ffd578937521
2013-04-15 06:04:40 +00:00
Richard Frith-MacDonald
8a605b360a
performance tweak for accumulating large amounts of data into a buffer.
...
eg. megabytes added in incremets of a few bytes at a time.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35328 72102866-910b-0410-8b05-ffd578937521
2012-07-30 16:55:51 +00:00
David Chisnall
603f5410a8
Fix a few compiler warnings caused by type mismatches in NSLog statements.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35037 72102866-910b-0410-8b05-ffd578937521
2012-04-06 12:37:11 +00:00
Richard Frith-MacDonald
77186600d2
revert accidental commit.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34824 72102866-910b-0410-8b05-ffd578937521
2012-02-27 10:31:05 +00:00
Richard Frith-MacDonald
b7a7b40179
add support to encode/decode larger arrays
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34823 72102866-910b-0410-8b05-ffd578937521
2012-02-27 10:29:10 +00:00
Eric Wasylishen
0c7763f7e1
* Source/NSData.m: Various 64-bit compatibility fixes, mostly changing
...
unsgined to NSUInteger.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34822 72102866-910b-0410-8b05-ffd578937521
2012-02-27 02:12:19 +00:00
Richard Frith-MacDonald
3fcd9f7d04
word size fixups
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34468 72102866-910b-0410-8b05-ffd578937521
2012-01-09 08:28:27 +00:00
Richard Frith-MacDonald
eec9f0e452
64bit printf tweaks
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34401 72102866-910b-0410-8b05-ffd578937521
2012-01-03 14:48:04 +00:00
Richard Frith-MacDonald
32fc733268
changes to support alternative header locations
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34290 72102866-910b-0410-8b05-ffd578937521
2011-12-15 09:42:39 +00:00
Richard Frith-MacDonald
eb8b275c1f
internal workaround for clang namespace pollution.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33993 72102866-910b-0410-8b05-ffd578937521
2011-10-14 15:46:13 +00:00
Richard Frith-MacDonald
0ceff0e920
fix typo
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33986 72102866-910b-0410-8b05-ffd578937521
2011-10-14 13:10:52 +00:00
Fred Kiefer
2a419593ce
* Source/NSData.m (-initWithCoder:, -encodeWithCoder): Correct
...
keyed encoding/decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33932 72102866-910b-0410-8b05-ffd578937521
2011-10-03 13:22:16 +00:00
Fred Kiefer
80c8a7ff06
Temporary revert David's change to use PRIxPTR, PRIuPTR and
...
PRIdPTR. Old compilers don't handled these well. (That change
didn't have a ChangeLog entry)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33766 72102866-910b-0410-8b05-ffd578937521
2011-08-20 13:05:37 +00:00
David Chisnall
4cdea64975
Make -base compile almost without warnings again. Fixes:
...
- Using the correct format specifier
- Remove substringFromRange: (GNUstep extension) from NSString.h and use the non-deprecated version in -base.
- Delete definitions of methods that are the same in both a class and a category on that class (NSArray and NSObject).
Two files still have warnings:
- The GNUTLS stuff is using a load of deprecated APIs.
- xmlparse.m replaces a method using a category. This method seems to always return nil. Not sure what it's meant to do, or why it isn't a delegate of some kind.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33756 72102866-910b-0410-8b05-ffd578937521
2011-08-16 16:04:43 +00:00
David Chisnall
d2ea054c26
Lots of little fixes to make -base compile with -Werror (now builds without warnings).
...
Richard: I'm unsure about three of these, which were fixes in memset() calls in:
- NSConcreteMapTable.m
- NSConcreteHashTable.m
- Additions/NSData+GNUstepBase.m
Please can you check them? I think they are intended to zero the entire object
(rather than the first word), but the lack of comments makes me unsure.
Most changes were just tweaks to variable types. I've also removed some dead code from NSInvocation. This was small group of things that were marked for internal use only, but not actually referenced in the code anywhere.
Other improvements:
- NSArray / NSDictionary fixed up to use the 10.7 (ARC-friendly) prototypes.
- getObjects:andKeys: implemented for NSDictionary (10.5 method)
- NSPointerArray and NSHashTable now properly support weak objects.
- Tests for weak objects in collections.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33621 72102866-910b-0410-8b05-ffd578937521
2011-07-24 13:09:22 +00:00
David Chisnall
75402211f2
Add a couple of __strong annotations to pointers. Any non-id pointer that can
...
store GC'd memory must be __strong. Currently, this annotation is largely
ignored, because the runtime is a lot more lax about what may store pointers
than Apple's, but this will be tightened up in the future.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33205 72102866-910b-0410-8b05-ffd578937521
2011-05-30 11:40:26 +00:00
David Chisnall
b08b2d0f34
More tweaks for garbage collection mode, including making NSNotificationCenter use weak pointers (things are never removed if it uses strong pointers because they remove themselves in the -dealloc method, which is never called, and can't remove themselves in the -finalize method because the -finalize method would not be called until after they have been removed - this is consistent with Apple behaviour).
...
Gorm now works correctly when built with GC enabled.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33109 72102866-910b-0410-8b05-ffd578937521
2011-05-25 11:15:08 +00:00
Richard Frith-MacDonald
8c89a47a8b
fix includes for gcc-4.6
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33069 72102866-910b-0410-8b05-ffd578937521
2011-05-19 08:19:24 +00:00
Richard Frith-MacDonald
b2649e0526
old/new objc api updates
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33027 72102866-910b-0410-8b05-ffd578937521
2011-05-12 16:03:08 +00:00