Commit graph

238 commits

Author SHA1 Message Date
Riccardo Mottola
490a0bcbb2 merge in latest bas64 changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/bitmarkets_changes@38639 72102866-910b-0410-8b05-ffd578937521
2015-06-15 10:29:19 +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
Richard Frith-MacDonald
ed0d634335 indentation fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32780 72102866-910b-0410-8b05-ffd578937521
2011-04-05 12:12:34 +00:00
Richard Frith-MacDonald
96e48988fc avoid compiler/linker warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32483 72102866-910b-0410-8b05-ffd578937521
2011-03-07 11:34:17 +00:00
Richard Frith-MacDonald
61bc059d4a Cleanup ... avoid accessing the 'isa' variable directly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32247 72102866-910b-0410-8b05-ffd578937521
2011-02-20 16:21:43 +00:00
Richard Frith-MacDonald
c7eeb1bb08 Use GSObjCRuntime functions for selector types until/unless we can get
a standard runtime API that handles them.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32240 72102866-910b-0410-8b05-ffd578937521
2011-02-20 07:58:11 +00:00
Richard Frith-MacDonald
60885954c6 Recommit tested changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32075 72102866-910b-0410-8b05-ffd578937521
2011-02-11 14:31:25 +00:00
Richard Frith-MacDonald
336c7bf021 Revert back to working code!
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32072 72102866-910b-0410-8b05-ffd578937521
2011-02-11 13:53:54 +00:00
Richard Frith-MacDonald
d81ac8a945 further tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32058 72102866-910b-0410-8b05-ffd578937521
2011-02-11 11:45:07 +00:00
David Chisnall
2edfea16be Fix bug reported by static analyser - NSData was testing ivars instead of arguments in -initWithBytesNoCopy:length:freeWhenDone:. The correct behaviour was to throw an exception if passed a NULL pointer and a length. The actual behaviour was to test whether the data object was invalid. This could lead to accidental NULL-pointer dereferencing later.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32030 72102866-910b-0410-8b05-ffd578937521
2011-02-10 10:13:50 +00:00
Nicola Pero
30f098f9f8 Updated code to compile with GCC 4.6 and the new GNU Objective-C runtime
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31765 72102866-910b-0410-8b05-ffd578937521
2010-12-23 02:23:05 +00:00
David Chisnall
4488708e84 Fix a load of warnings from implicit function declarations. A lot were caused by ctype.h and string.h stuff being used everywhere in GNUstep but not included anywhere - they're now included in common.h (at least string.h should also be in Foundation.h - on OS X it is implicitly included via some chain of things from Foundation.h).
All of the sel_* stuff is now replaced with the newer APIs.  As a side-effect, a blob of code that was copied-and-pasted all over GNUstep has now been moved into ObjectiveC2 and just called.

Class posing with libobjc2 will now throw an exception, rather than just aborting.  



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31268 72102866-910b-0410-8b05-ffd578937521
2010-09-09 16:30:10 +00:00
Richard Frith-MacDonald
44259dbf9e attempt fix for bug 29920
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30471 72102866-910b-0410-8b05-ffd578937521
2010-05-29 08:05:03 +00:00
Richard Frith-MacDonald
f784646663 generalize define from __MINGW32__ to __MINGW__
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30001 72102866-910b-0410-8b05-ffd578937521
2010-03-19 12:10:11 +00:00
Richard Frith-MacDonald
39fc4419b0 further cleanup ... always use -zone method to get an object's zone ...
so people can safely write subclasses using different allocation schemes.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29847 72102866-910b-0410-8b05-ffd578937521
2010-03-05 09:30:18 +00:00
Richard Frith-MacDonald
14b91c9052 fixups for libobjc2
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29753 72102866-910b-0410-8b05-ffd578937521
2010-02-25 18:49:31 +00:00
Richard Frith-MacDonald
225e580a9f fix error in printf format
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29699 72102866-910b-0410-8b05-ffd578937521
2010-02-22 10:48:10 +00:00
Richard Frith-MacDonald
8769dd8b6f deprecates some gnustep runtime wrappers
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29697 72102866-910b-0410-8b05-ffd578937521
2010-02-22 10:13:20 +00:00