Commit graph

8546 commits

Author SHA1 Message Date
hmelder
ba3ddf14b7 No deprecated KVC compat 2024-09-10 17:06:18 +02:00
hmelder
c06a466af7 Merge branch 'kvc-caching' into kvo-kvc-test 2024-09-10 17:05:11 +02:00
hmelder
8a5c2b4c1a Merge branch 'kvo_winobjc' into kvo-kvc-test 2024-09-10 17:04:02 +02:00
hmelder
e7b18c1b0b Avoid using method_getTypedSelector_np as detecting support is a pain 2024-09-10 16:17:17 +02:00
hmelder
1fc9da8134 Update Archiving of Structs 2024-09-10 13:42:38 +02:00
hmelder
2ebbb02918 Use type encoding helpers to detect known structs in KVC 2024-09-10 12:45:27 +02:00
hmelder
9eedbc2b49 Add type encoding helper header 2024-09-10 12:44:07 +02:00
hmelder
cdbb1cc1b4 Fix typo in ifdef 2024-09-10 10:23:08 +02:00
hmelder
22318791b4 Remove redundant checks 2024-09-09 17:26:49 +02:00
Hugo Melder
012947f09e
NSOperationQueue: Proper names for worker threads (#437)
* NSOperationQueue: Give Worker Threads a name

* Update Changelog

* Remove empty string test
2024-09-08 16:54:01 +02:00
hmelder
95825c0569 NSKeyValueCoding+Caching: Add Versioning to IVar Slot 2024-09-07 19:17:41 +02:00
hmelder
27cc25c248 Update Copyright Years 2024-09-07 12:04:40 +02:00
hmelder
3ebcf8aa48 Guard old ValueForKey function when using the fast-path 2024-09-07 12:03:05 +02:00
hmelder
78a909f9e8 Use fast-path when using Objective-C 2 2024-09-07 12:03:05 +02:00
hmelder
1a26f6436a Do not ignore struct name when comparing type encoding as NSPoint and NSSize have the same layout 2024-09-07 12:03:05 +02:00
hmelder
64a37ff8e5 KVC Caching Implementation 2024-09-07 12:02:29 +02:00
hmelder
538f0ed023 NSThread: Add warning when truncating thread name 2024-09-02 14:51:59 +02:00
Hugo Melder
7474bd80e3
Add Branch Prediction Macros and Error checks in Android Initialisation (#438)
* Add Branch Prediction Macros

* Rigorous Error Handling when using JNI
2024-08-20 19:19:59 +02:00
rfm
7cf59e475a avoid compiler warning 2024-08-19 11:05:54 +01:00
rfm
ed4e305026
NSURLSession rewrite (#422)
* clang-format: Do not use tabs

* Ignore clangd cache and compile_commands

* NSBlockOperation: Fix memory leak

* NSHTTPCookie: Fix expires date parsing

* NSHTTPCookie: Release DateFormatter after use

* NSOperation: Remove all objects at end of execution

* Reimplementation of NSURLSession

* NSURLSession: Update expiration dates in test

* Update ChangeLog

* Fix trivial compiler warning caused by missing import

* Import GSDispatch.h for definition of DISPATCH_QUEUE_SERIAL

* Import common.h early to avoid header conflict

* Fix import order to avoid conflicts and ensure we have correct localisation macro

* Check for presence of dispatch_cancel

* Cancel timer using dispatch_source_cancel() if dispatch_cancel() is missing.

* NSURLSession: Replace dispatch_io with dispatch_source in unit test HTTP server

---------

Co-authored-by: hmelder <service@hugomelder.com>
2024-08-16 14:08:41 +02:00
Hugo Melder
162708f7ed
NSThread: Fix threadPriority and setThreadPriority: on Android by using setpriority instead of pthread (#436)
* Update Changelog

* Use {get, set}priority for -[NSThread setThreadPriority] on Android
2024-08-13 19:59:56 +02:00
Earl Robsham
a5ed5dbe11
Update -[NSMutableArray removeLastObject] (#433)
* Update `-[NSMutableArray removeLastObject]`

Updates the following implementation to avoid raising an exception if the array is already empty (or notifying observers if applicable):
 * `-[NSMutableArray removeLastObject]`
 * `-[GSMutableArray removeLastObject]`
 * `-[NSKeyValueMutableArray removeLastObject]`
 * `-[NSKeyValueIvarMutableArray removeLastObject]`

This brings the behavior of `-[NSMutableArray removeLastObject]` inline with the Apple implementation, improving compatibility for code bases which use both GNUStep and Apple objc/Foundation implementations.

* Add `-[NSMutableArray removeLastObject]` test case

Adds a test case to ensure `-[NSMutableArray removeLastObject]` does not raise an exception when called on an empty array.
2024-08-10 23:44:02 +02:00
rfm
bf7ccc407d avoid compiler warning 2024-08-08 14:21:22 +01:00
rfm
1e0df026d9 Supply function pointer prototype to avoid compiler warnings 2024-08-08 14:18:16 +01:00
Hugo Melder
81b3c721bc
NSUserDefaults: Retrieve native UI languages from Windows and Android System APIs (#426)
* Create NSString Win32Additions Category

* NSUserDefaults: Fetch Windows UI language information

* NSUserDefaults: Add winnls include

* Android Native UI Language

* NSUserDefaults: Replace incorrect separator on Windows

* NSProcessInfo: BCP-47 Note

* GSConfig: Bump MinGW WINVER to Vista

* NSString+Win32Additions: Do not add array to arp twice

* NSUserDefaults: Increase default length
2024-08-07 16:26:16 +02:00
rfm
9bdad8d56b Add option to set stylesheet 2024-08-06 20:17:38 +01:00
rfm
6c43f6c831 iFixup trace function type/name 2024-08-06 20:17:05 +01:00
rfm
04f0d76904 Fix use of obsolete/deprecated method. 2024-07-31 10:24:04 +01:00
rfm
6d8f546c08 fix trivial typo 2024-07-31 10:22:48 +01:00
rfm
28a6e6ebbd Final batch of GC cleanups (for the forseeable future). 2024-07-25 17:11:34 +01:00
rfm
b49af95359 Hide internals of _NSZone struct for consistency with OSX 2024-07-23 13:06:24 +01:00
rfm
52c127c950 GC was deprecated several releases ago and notinally removed a couple of releases ago ... delete more remnants of the old code. 2024-07-22 15:14:13 +01:00
rfm
a1514249f3 Tweaks to match OSX pointer array behaviors more accurately. 2024-07-22 12:22:40 +01:00
rfm
5699959d39 zeroing weak memory is now treated as weak memory since GC has been dropped 2024-07-21 09:46:33 +01:00
rfm
c46d447100 Deprecate/remove old GC options 2024-07-21 09:16:09 +01:00
rfm
c435c6d7d6 Remove/update confusing comments. Separate acquire and assign operations for pointer functions. 2024-07-17 15:42:33 +01:00
rfm
2c1a993612 Update hadling of nil args to match OS-X 2024-07-17 11:32:01 +01:00
rfm
1a1e7f7fc5 Acquiring existing memory does not use a funtion on OSX, copy that behavior. 2024-07-16 19:43:28 +01:00
rfm
b677ea402a Add some simple pointer functions personality tests 2024-07-16 12:07:32 +01:00
rfm
4629a4e1f6 Tweaks related to issue #311 2024-07-15 17:19:16 +01:00
rfm
b91ff38636 issue 424 2024-07-09 17:03:39 +01:00
rfm
33e5b72a97 fix last modifiecation 2024-07-07 16:59:25 +01:00
rfm
9442ff8dac github issue 378 2024-07-07 13:56:20 +01:00
rfm
cb68ba8864 Make notification delivery a little more predictable (issue #423) 2024-07-04 11:48:58 +01:00
rfm
0cf5955e00 Avoid (some cases of) compiler warning; mixing declarations and code is incompatible with standards before C99 2024-07-03 16:21:13 +01:00
rfm
3fedf31c2d
Revert "NSURLSession Reimplementation (#411)"
This reverts commit 07233534e6.
2024-07-02 19:19:14 +01:00
Hugo Melder
07233534e6
NSURLSession Reimplementation (#411)
* clang-format: Do not use tabs

* Ignore clangd cache and compile_commands

* NSBlockOperation: Fix memory leak

* NSHTTPCookie: Fix expires date parsing

* NSOperation: Remove all objects at end of execution

* Reimplementation of NSURLSession

* Update ChangeLog
2024-07-02 15:58:48 +02:00
rfm
9367c2d796 use memory management notation for clang static analyzer 2024-06-23 10:35:16 +01:00
rfm
7532837db4 fix method names 2024-06-21 21:18:17 +01:00
rfm
2c0ee5bf49 avoid compiler static analyzer warning 2024-06-21 17:28:49 +01:00