Commit graph

11 commits

Author SHA1 Message Date
Hugo Melder
6681a3da47
Initial port of WinObjC's KVO implementation to GNUstep (#420)
* GSAtomic: Add prefix to macro definitions

* NSKVOSupport: Import

* NSKVOSupport: Add test cases

* NSKVOSwizzling: Ugly C Rewrite

* NSKeyValueObserving: Use old implementation as fallback

* NSKeyValueObserving: Rename TypeEncodingCases header

* NSKVOSupport: Fix new objects not being added to NSKeyValueChangeNew set on set mutation

* NSKeyValueMutableSet: Fix will and didChange notifications for set operations

* NSKeyValueMutableSet: Document Accessor Search Patterns

* NSKVOSupport: Add toMany test

* NSKeyValueCoding: Change notifications when changing value via setValue:forKey:

* NSKVOSupport: Add more tests

* NSKVOSupport: Do not wrap block in try/finally to avoid crash in windows

* NSKVOSwizzling: use _alloca on Windows

* NSKVOSupport: Do not autorelease newWithObservee:

* NSKVOSupport: Do not leak Observee and TestFacade objects

* Improve runtime detection in makefile

* Add file extension of source file in GNUMakefile

* NSKVOSupport: Remove @status comments

* NSKVOSupport: Implement private notify method

* NSUserDefaults: KVO Support and fix macOS incompatibilities

* NSKeyValueObserving: Set old to null if nil

* NSKeyValueObserving: Remove cached new value

* NSMethodSignature: Add signature cache

* NSKVOSupport: Remove ObjC2 features and mark tests failing on GCC as hopeful

* Call class method instead of private _keyPathsForValuesAffectingValueForKey

* Move _keyPathsForValuesAffectingValueForKey body into class method and statically construct empty NSSet

* NSUserDefaults: Change notification should contain old value from other domains aswell

* NSUserDefaults: Fetch new value from all domains

* NSKVOInternal: Fixup filename in header

* NSUserDefaults: Go through search list instead of only one domain in KVO change

* Making indentation a bit less worse

* Add NSUserDefaults KVO tests

* NSKVOSupport: NSUserDefaults test small fixes

* Add autoreleasepool

* NSUserDefaults: Only emit change notifications if value changed

* Avoid compiler warnings and tidy some of the whitespace/formatting

---------

Co-authored-by: Frederik Seiffert <frederik@algoriddim.com>
Co-authored-by: rfm <richardfrithmacdonald@gmail.com>
Co-authored-by: rfm <rfm@gnu.org>
2024-11-10 17:05:23 +01:00
rfm
6667842dd5 Update FSF address as requested by Gregory 2024-11-07 13:37:59 +00:00
Frederik Seiffert
abfe4e2a04 Use native threading and locking APIs on Windows
Removes dependency on pthread library and uses fast Slim Reader/Writer (SRW) locks for NSLock/NSRecursiveLock/NSCondition/NSConditionLock as well as all internal locks. Adds GS_MUTEX_*() macros in GSPThread.h, that are being used for all internal locking instead of pthread APIs.

Also adds support for thread priorities on Windows, fixes method signature of +[NSThread setThreadPriority:] to match Apple platforms, and adds error handling in same method.
2021-07-29 14:22:27 +02:00
Gregory John Casamento
753c907938 Fix address for FSF and License name in all headers in base 2019-12-09 18:36:00 -05:00
Richard Frith-Macdonald
603c3b1103 indicate trace by use of subclass rather than flag 2018-04-04 12:58:06 +01:00
Richard Frith-Macdonald
2d3039694f Stack tyrace generation optimisation 2018-03-26 14:49:13 +01:00
Richard Frith-MacDonald
23b7ff95cd Simplify source by usuing autoconf
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30692 72102866-910b-0410-8b05-ffd578937521
2010-06-12 07:19:26 +00:00
Riccardo Mottola
e574fe480c fix for defines of _XOPEN_SOURCE
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30680 72102866-910b-0410-8b05-ffd578937521
2010-06-11 19:07:26 +00:00
Riccardo Mottola
462f5721ab change defines for GNU/HURD
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30039 72102866-910b-0410-8b05-ffd578937521
2010-03-25 22:53:21 +00:00
Riccardo Mottola
19e49c3314 use proper _XOPEN_SOURCE instead of __USE_UNIX98 to enable needed thread features on glibc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29897 72102866-910b-0410-8b05-ffd578937521
2010-03-10 17:37:00 +00:00
Richard Frith-MacDonald
b662140e16 Apply patch to switch completely to using pthreads
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29367 72102866-910b-0410-8b05-ffd578937521
2010-01-23 17:00:13 +00:00