Commit graph

7989 commits

Author SHA1 Message Date
Gregory John Casamento
fff7573b88 Correct changelog 2020-06-14 20:21:12 -04:00
Richard Frith-Macdonald
057445b4e7 Merge branch 'master' of ssh://github.com/gnustep/libs-base 2020-06-11 16:30:49 +01:00
Gregory John Casamento
c8ab7a3bc2 Merge branch 'master' of github.com:gnustep/libs-base into NSSecureCoding_branch2 2020-06-11 09:38:20 -04:00
Frederik Seiffert
d6d2fa9a74 Fix recursive creation of value transformers. 2020-06-11 14:22:04 +02:00
Frederik Seiffert
c6f24e6634 Fix Android assets support for bundle directories 2020-06-10 20:31:03 +02:00
Riccardo Mottola
b879e0835b explicitely test for ws2tcpip.h header, fix library detection on windows for inet_ntop with corrent library, guard includes and definitions with configure results, cleanup header inclusion 2020-06-09 13:44:42 +02:00
Richard Frith-Macdonald
41ab84eaba So not attempt to alter creation date of newly created file. 2020-06-09 11:43:56 +01:00
Gregory John Casamento
3b315b9d21 Merge branch 'master' of github.com:gnustep/libs-base into NSSecureCoding_branch2 2020-06-08 04:12:45 -04:00
rfm
daadfe7a6d
Merge branch 'master' into android-assets-directory-improvements 2020-06-06 12:13:43 +01:00
rfm
e2d223b564
Merge pull request #142 from gnustep/msys-fix
Msys fix
2020-06-06 11:11:06 +01:00
Richard Frith-Macdonald
41badcb417 Fix leak of new operation in -blockOperationWithBlock: method. Make -addExecutionBlock: ensure it works with an on-heap copy of its argument. Tidy code to have NSBlockOperation methods with normal formatting and alphabetical order. Tidy code to use standard macros for memory management. 2020-06-05 17:43:46 +01:00
Riccardo Mottola
5bbe378a79 remove unneeded window headers include, since common.h will include GSConfig.h 2020-06-05 13:46:34 +02:00
Frederik Seiffert
71f6cde4bd Fix replacing an existing value in a weak objects map table. 2020-06-05 11:55:33 +02:00
Gregory John Casamento
ea162442ce Merge branch 'master' of github.com:gnustep/libs-base into NSSecureCoding_branch2 2020-06-04 18:40:14 -04:00
Richard Frith-Macdonald
a1d5d020b3 Change -objectForKey: method to get the contents into a buffer (on the stack) and iterate through them rather than creating an autoreleased enumerator. This avoids allocation/autorelease/deallocation of the enumerator (as well as etain/release of the search list by the enumerator) which should give better performance generally and avoid excess object creation when lots of defaults lookups are done in an autorelease pool. 2020-06-03 14:48:22 +01:00
Gregory John Casamento
597f0a917e Merge branch 'master' of github.com:gnustep/libs-base into NSSecureCoding_branch2 2020-05-31 17:41:23 -04:00
rfm
bf4c0719aa
Merge pull request #136 from gnustep/windows-ci
Set up CI for Windows using MinGW and GCC
Looks good, merging.
2020-05-29 16:33:42 +01:00
Richard Frith-Macdonald
6fd8dd7a20 Wrap code for posting of notifications (for becoming multithreaded and for a thread being about to exit) in an autorelease loop. This should avoid possible leakage of objects and warnings during the notification process. 2020-05-29 16:25:52 +01:00
Frederik Seiffert
a0fe037077 Include winsock2.h before windows.h, as required by MSYS2/MinGW-w64. 2020-05-29 10:40:03 +02:00
Gregory John Casamento
96f88dcc95 Merge branch 'master' of github.com:gnustep/libs-base into NSSecureCoding_branch2 2020-05-29 00:53:39 -04:00
Richard Frith-Macdonald
fab98ede73 On thread exit we must post the notification that it *will* exit before
setting the instance variable to say that it has finished.  This is tested
as the order OSX does it, and makes sense to ensure that, when -isFinished
returns YES we can be sure the thread will not do anything else.
2020-05-26 16:30:15 +01:00
rfm
a636994a33
Merge pull request #138 from triplef/fix-nsuserdefaults-setbool
Store NSNumber instead of NSString for NSUserDefaults -setBool:forKey:.
2020-05-26 12:38:41 +01:00
Richard Frith-Macdonald
861f8de610 Remove excess whitespace and copy trick to NSPortCoder 2020-05-26 09:18:49 +01:00
Gregory John Casamento
3a0420bddf Merge branch 'master' into NSSecureCoding_branch2 2020-05-26 01:52:58 -04:00
Riccardo Mottola
e7f89135d3 rewrite lower negative bounds to avoid integer constants underflow of literals 2020-05-25 23:50:36 +02:00
Frederik Seiffert
d2938c7729 Store NSNumber instead of NSString for NSUserDefaults -setBool:forKey:. 2020-05-25 17:34:34 +02:00
Frederik Seiffert
db19fc3308 Android assets improvements to support directories
- Extend NSBundle resources support to handle directories in Android assets.
- Fix NSFileManager -isReadableFileAtPath: to also support directories in Android assets.
2020-05-20 13:39:47 +02:00
Gregory John Casamento
2b38728f6e Merge branch 'master' into NSSecureCoding_branch2 2020-05-15 10:08:56 -04:00
Gregory John Casamento
4230180eab Add set/get for requiresSecureCoding 2020-05-15 10:06:39 -04:00
Frederik Seiffert
9f0d8d7720 Fix building Win32 classes with nonfragile ABI. 2020-05-13 18:08:35 +02:00
Gregory John Casamento
1a6a091fc4 Add set/get method for requiresSecureCoding 2020-05-13 02:29:53 -04:00
Gregory John Casamento
a0f50deb64 Fix fred's suggestions. Put guard and make more general method the one which is called. 2020-05-12 14:02:50 -04:00
Gregory John Casamento
be8980dfb4 Fix fred's suggestions. Put guard and make more general method the one which is called. 2020-05-12 14:01:44 -04:00
Gregory John Casamento
9d252bd5b6 Merge branch 'master' of github.com:gnustep/libs-base into NSSecureCoding_branch 2020-05-12 12:09:27 -04:00
Richard Frith-Macdonald
95b6f3a18e Casts to fix systems where the UCalendarDateFields enumeration is unsigned 2020-05-12 13:35:18 +01:00
rfm
57e4eba479
Merge branch 'master' into file_creation_date 2020-05-12 13:25:49 +01:00
rfm
50d1358028
Merge pull request #132 from niwatako/fix-exponent-validation-in-jsonserialization
Fix exponent validation in NSJSONSerialization
Buce fix ... thanks.
2020-05-12 13:23:29 +01:00
Gregory John Casamento
e294089032 Merge branch 'master' into NSSecureCoding_branch 2020-05-11 16:55:28 -04:00
Gregory John Casamento
4dc1c566c1 Send error back 2020-05-11 16:54:41 -04:00
rfm
6b008fc19e
Merge branch 'master' into android-nsinputstream-support 2020-05-11 15:02:05 +01:00
niwatako
dccd799256 Fix exponent validation 2020-05-11 21:46:25 +09:00
fredkiefer
e71c2f68fa * Source/NSISO8601DateFormatter.m,
* Source/NSOrthography.m: Clean up some compiler warnings.
2020-05-10 23:07:27 +02:00
fredkiefer
f4c5c519c2 * Source/NSXMLParser.m: Fix small bug in last commit that broke
all gui applications when there was a commented out section in the
user default XML file.
2020-05-08 21:59:28 +02:00
Richard Frith-Macdonald
5aab6f84cf Use RELEASE macro for memory management 2020-05-08 15:26:07 +01:00
Richard Frith-Macdonald
b26a2f49ea Convert to using indexes into a buffer 2020-05-08 15:05:17 +01:00
Gregory John Casamento
264811b3d0 Merge branch 'master' of github.com:gnustep/libs-base into NSSecureCoding_branch 2020-05-07 17:10:50 -04:00
Frederik Seiffert
b549dbbaec NSLocale improvements
Use "instancetype" for instance-returning methods. Fix method signature of -displayNameForKey:value:.
2020-05-07 15:30:36 +02:00
Richard Frith-Macdonald
6fc9449241 Reorganise to make the separation of the two parsers clearer. NSXMLParser is the sloppy parser and can be selected using the dummy subclass GSSloppyXMLParser while, if we have libxml2, we can specifically select the strict parser using the GSStrictXMLParser class. 2020-05-06 15:24:04 +01:00
rfm
ca2abf51f7
Merge pull request #130 from triplef/add-nsxmlparser-stream-support
Implement -[NSXMLParser initWithStream:].
2020-05-06 14:08:39 +01:00
Fred Kiefer
0b4f3b382a
Merge pull request #126 from alotorev/bugfix/NSURLComponents
Bugfix/nsurl components
2020-05-06 13:09:35 +02:00
Gregory John Casamento
e2ce929761 Merge branch 'master' of github.com:gnustep/libs-base into NSSecureCoding_branch 2020-05-06 05:04:45 -04:00
Frederik Seiffert
5dfda50d82 Implement -[NSXMLParser initWithStream:]. 2020-05-05 19:41:22 +02:00
Frederik Seiffert
547983738a Add NSInputStream support for reading Android assets from main bundle. 2020-05-05 15:42:10 +02:00
Richard Frith-Macdonald
dcfe2a2ce3 Fix -[NSCharacterSet invertedSet] to work by calling -invert on a mutable copy 2020-05-05 09:51:34 +01:00
Gregory John Casamento
76fac00cd2 Merge branch 'master' of github.com:gnustep/libs-base into NSSecureCoding_branch 2020-05-04 05:50:58 -04:00
Riccardo Mottola
bfcc2db53c In changeFileAttributes implement setting of creation date also for Unix, which needs to be done before setting the modification date. Also, implement reading the creation (birth time) date if a supported method was detected. 2020-05-04 10:17:25 +02:00
alotorev
4aa11f3e48 Improvements suggested by Fred Kiefer for the current pull request 2020-05-04 10:55:41 +03:00
alotorev
2a547271ad OSX like behaviour for NSURLQueryItem initialisers 2020-05-04 02:27:26 +03:00
alotorev
ce1c03f6da Fixed bugs leading to leaks, no autorelease in NSURLComponents factory methods. 2020-05-04 02:00:53 +03:00
alotorev
ec62905dd6 Fixed initialization NSURLComponents with NSURL, should treat a query from NSURL as a percent-encoded string. 2020-05-04 01:58:54 +03:00
niwatako
6869df9a50 Fix loss of buffer in NSJSONSerialization.
The first time bufferSize is extended, number loses the previously parsed characters.
After malloc the number, copy the numberBuffer to the number.
2020-05-01 23:51:55 +09:00
Riccardo Mottola
dfb4fc1976 fix log info 2020-05-01 02:06:00 +02:00
Riccardo Mottola
21c79c3500 Use utimensat() to set file modification date, if available. 2020-05-01 02:03:25 +02:00
Riccardo
e23ab3b394
Merge pull request #123 from gnustep/master
keep up with master
2020-04-30 11:14:10 +02:00
Richard Frith-Macdonald
0aeaee68da Fixup -stringByAddingPercentEncodingWithAllowedCharacters: to ignore membership
of the supplied set if the character is not in the ASCII range.
2020-04-27 20:25:24 +01:00
Richard Frith-Macdonald
9eb0fd4e1a Fix typo spotted by 'alotrev' 2020-04-27 09:14:36 +01:00
fredkiefer
a48694941c Add newer features for NSDateComponents and
started to clean up NSCalendar implementation.
2020-04-26 21:13:22 +02:00
fredkiefer
4fe6cb20a1 Started to rewrite NSCalendar to handle more components correctly. 2020-04-26 00:32:49 +02:00
fredkiefer
82e9ddc21f Add missing NSDateComponents methods. 2020-04-25 22:19:20 +02:00
Gregory John Casamento
082f87fbc3 Start implementing some secure coding methods. 2020-04-24 03:59:17 -04:00
Richard Frith-Macdonald
a9767cdff7 Override -hash and -isEqual: so that notifications with the name name, object, and userInfo are considered equal. This is the OSX behavior. 2020-04-21 09:16:53 +01:00
Richard Frith-Macdonald
05f442de8b Fix for NSURLResponse does not allow for multiple Set-Cookie headers in the same response #85 ... combine multiple header values as a comma separated list. 2020-04-16 23:04:37 +01:00
Richard Frith-Macdonald
6d714c8ee1 Fix for Deadlock in NSOperationQueue #49: If an exception occurs when trying to detach thread, catch it and log it so that locking is not broken by the exception breaking out of the lock protected region. 2020-04-16 22:48:25 +01:00
Richard Frith-Macdonald
6ee0cfff00 Add testcase for multiple clookies in a header. Fix error parsing a literal
string (writing nul terminator to read only memory)
2020-04-16 20:19:53 +01:00
Richard Frith-Macdonald
3d1e84f6fe rewrite code for separating individual cookies from a comma separated header so
it better matches what OSX does (and is hopefully a bit simpler)/
2020-04-16 19:39:32 +01:00
Richard Frith-Macdonald
132729e6e0 Add casts to avoid compiler warnings bout type of method 2020-04-15 10:40:41 +01:00
Richard Frith-Macdonald
09e9354f08 Fully type method implementatyion pointers. 2020-04-15 10:31:55 +01:00
Richard Frith-Macdonald
53f5957030 When building outside GNUstep (additions for apple), include the runtime
declarations and fix error in casting self.
2020-04-14 17:18:24 +01:00
Richard Frith-Macdonald
7829ab86b5 Fix line somehow missed from ast commit 2020-04-14 08:26:07 +01:00
Richard Frith-Macdonald
47ce8d3da7 Remove custom code for percent escaping and replace it with standard code using
custom charactersets.
2020-04-13 10:05:57 +01:00
Richard Frith-Macdonald
ccb8594bc0 Fix [NSURLProtocol -initWithRequest:cachedResponse:client:] to retain the client (up until the last message is sent to it) as OSX does. 2020-04-13 08:53:02 +01:00
Richard Frith-Macdonald
df1b6dd6d5 Characterset memory usage and code organisation consistency improvements. 2020-04-12 12:28:07 +01:00
Riccardo Mottola
ce313e1384 Implement read and set of File Creation Date attribute on Windows. 2020-04-09 23:43:41 +02:00
Frederik Seiffert
cc56c9cc97 Fixed NSOperation completion block memory mgmt. 2020-04-09 09:24:43 +02:00
Richard Frith-Macdonald
882b1419f5 remove redundant/repeated line 2020-04-05 10:27:02 +01:00
Richard Frith-Macdonald
ebaf23e295 Fix boundary error removing percent escapes 2020-04-05 10:26:28 +01:00
Fred Kiefer
adb67ee405
Merge pull request #118 from gnustep/fix-nsurlcomponents
fixups for setting/getting nil/empty query string values
2020-04-05 09:06:24 +02:00
Richard Frith-Macdonald
2a24e8d080 fixups for setting/getting nil/empty query string values 2020-04-04 22:37:40 +01:00
Gregory Casamento
a7867718b0
Merge pull request #115 from gnustep/fix-nsurlcomponents
Merging since all outstanding bugs appear to have been addressed.
2020-04-04 15:55:00 -04:00
fredkiefer
b0c763de36 Build the string instead of the URL.
Build the URL on the fly.
2020-04-04 20:33:55 +02:00
Richard Frith-Macdonald
ac45beb4c1 fix error in refactoring query (storing name twice rather than name/value) 2020-04-04 17:32:27 +01:00
Gregory John Casamento
cf13a7c21b Merge branch 'fix-nsurlcomponents' of github.com:gnustep/libs-base into fix-nsurlcomponents 2020-04-04 12:15:24 -04:00
Gregory John Casamento
213344d862 Add tests and modifications to pass them 2020-04-04 12:15:17 -04:00
Richard Frith-Macdonald
8eff23e780 Rewrite query handling code to try to mimic OSX documentation with regards to
the differences between setting nil/empty query strings/items and also in the
handling of query items with nothing before the '=', nothing after the '=',
and the case where there is no '=' character (also the totally empty case
where the query string contains a double ampersand (&&) sequence).
2020-04-04 15:13:14 +01:00
Gregory John Casamento
86276f0c7f Fix issue with scheme 2020-04-04 09:54:42 -04:00
Gregory John Casamento
564f61d572 Add tests for NSURLComponents 2020-04-04 09:44:22 -04:00
Richard Frith-Macdonald
4ffce48b04 I suggest when we regenerate we build the URL by appending to a mutable string
sas this would be hugely more efficient.
2020-04-04 14:22:25 +01:00
fredkiefer
d05b799740 Restore caching of URL.
Rewrite URL building to get the ranges correct.
Build URL with escaped components.
Build query from percentEncodedQueryItems.
2020-04-04 13:36:51 +02:00
Gregory John Casamento
ca6e48910a Minor fix to remove/add percent encoding to name portion of query item 2020-04-04 07:04:06 -04:00
Gregory John Casamento
5f1541d154 Always regenerate when we call [NSURLComponents URL] otherwise subsequent calls will return nil 2020-04-04 06:48:02 -04:00