Commit graph

8433 commits

Author SHA1 Message Date
rfm
1e0023dc43 fix uninitialised variable 2024-05-26 16:49:22 +01:00
Doug Simons
0935f77d8f
Merge pull request #405 from gnustep/small_xml_fixes
Two small xml fixes
2024-05-15 09:26:57 -06:00
Frederik Seiffert
94a6cb9919 Fix Unicode includes in NSString.m
Fixes compilation using ICU bundled with Windows.
2024-05-15 17:09:00 +02:00
Doug Simons
fdffcbdd27
Update NSXMLElement.m to satisfy older compilers 2024-05-14 15:56:43 -06:00
Doug Simons
f5f8f61e54
oops! Put the other bracket back in. 2024-05-14 15:44:44 -06:00
Doug Simons
256700d57d
avoid using Obj-C 2.0 notation 2024-05-14 15:40:22 -06:00
Doug Simons
50f447f5b8
Fix execute_xpath() to return an NSError when expression can't be evaluated; Remove previous attributes when setting attributes; Add related tests 2024-05-14 15:25:07 -06:00
rfm
3f994d3ee1 avoid compiler warnings 2024-05-12 15:07:49 +01:00
rfm
e9cfa9558b removed unused import 2024-05-12 10:14:02 +01:00
rfm
adbc7c2631
Merge pull request #400 from gnustep/nsurlhandle_cache
GSFileURLHandle: Remove file handle caching
2024-05-12 10:11:28 +01:00
rfm
35bb9f48ef regular expression range search 2024-05-12 10:03:15 +01:00
rfm
1fdf6395bd
Merge pull request #370 from ethanc8/ethanc8-3
Implement +[NSRegularExpression escapedPatternForString:] and -[NSString enumerateSubstringsInRange:options:usingBlock]
2024-05-12 09:32:34 +01:00
rfm
00a95fef78 trivial coding style fixups 2024-05-09 12:20:45 +01:00
hmelder
77e3453020 Remove FIXMEs 2024-05-08 16:06:44 +02:00
hmelder
6155329b64 NSIndexSet: Implement enumerateRangesInRange convenience methods 2024-05-08 16:06:44 +02:00
hmelder
f6eaa5bd03 NSURLSession: Call completion handler on failed request 2024-05-08 16:05:17 +02:00
rfm
6011b3c528 Protect bfd symbol lookup for thread safety 2024-05-07 11:24:26 +01:00
hmelder
a1dff584a4 GSFileURLHandle: Remove caching functionality 2024-05-06 18:06:50 +02:00
hmelder
a127d4ee75 GSFileURLHandle: Expose internal cache 2024-05-06 10:44:22 +02:00
hmelder
e1fcc2db35 GSFileURLHandle: Use NSCache and limit cache size 2024-05-06 10:38:07 +02:00
williameveretteggplant
21a48f6136
NotificationCenter removeObserver (#396)
This modifies the NotificationCenter class to do the following:

- add an ivar to the class for an array to hold observers that need to be released when they are removed
- adds an observer to that array if the observer is of class GSNotificationObserver
- upon removing an observer, check if it is in that array, if so remove it from the array and release it.

This replaces the previous implementation which checked the class of the observer as it was being removed, which would cause a crash if the observer had been deallocated.
2024-04-30 18:44:26 +02:00
rfm
a5beb6ab31 Fix for bug #399 2024-04-29 13:11:35 +01:00
hmelder
10eaba4f13 Fix dummy function signature 2024-04-28 23:22:20 +02:00
hmelder
8ec158ad05 Guard Windows Header Include 2024-04-28 23:22:20 +02:00
hmelder
8a93628ecb NSThread: Fix behaviour and Implement setName on Win32 2024-04-28 23:22:20 +02:00
Frederik Carlier
810a39b1f8
Map CURLE_COULDNT_CONNECT to NSURLErrorCannotConnectToHost (#388)
Map `CURLE_COULDNT_CONNECT` to `NSURLErrorCannotConnectToHost`.

When connecting to an IPv6 socket fails, curl easy will return `CURLE_COULDNT_CONNECT`.  GNUstep currently maps `easyCode == CURLE_COULDNT_CONNECT && failureErrno == ETIMEDOUT` to `NSURLErrorTimedOut`, in all other scenarios `CURLE_COULDNT_CONNECT` is not handled.

This would cause the `NSURLSession/test01` to fail on (certain) systems with IPv6 enabled.

This PR maps all other values of `CURLE_COULDNT_CONNECT` to `NSURLErrorCannotConnectToHost`.
Additionally, it also stores the value of `easyCode` in the `NSUnderlyingErrorKey` to make troubleshooting (slightly) easier.
2024-04-21 10:26:24 +01:00
hmelder
1d33c2095f Fix formatting 2024-04-17 23:32:56 +02:00
hmelder
279d91e0f3 NSTimeZone: Import NSScanner 2024-04-17 23:32:56 +02:00
hmelder
2918bd992e Refactor +[NSTimeZone timeZoneArray] 2024-04-17 23:32:56 +02:00
Frederik Seiffert
7842a79839 Removed obsolete GS_ARC_COMPATIBLE define (replaced by OBJC_CAP_ARC) 2024-04-15 09:55:14 +02:00
Frederik Seiffert
ec8a7a3e97 Add +[NSObject _TrivialAllocInit] to enable fast-path alloc / init methods with libobjc2 2.2 2024-04-15 09:55:14 +02:00
rfm
a2b8f34661 Some web servers send empty headers ... tolerate it. 2024-04-04 10:59:00 +01:00
Gregory Casamento
3c1db49f4f
Merge pull request #384 from qmfrederik/dummy-nsnetservices 2024-04-03 23:49:03 -04:00
rfm
d52708e020 Fix for #385 2024-04-02 11:07:14 +01:00
Frederik Carlier
97c01d8064
NSNetService and NSNetServiceBrowser: Gracefully fail when no-backend implementation
Always compile `NSNetService` and `NSNetServiceBrowser`, but have their
`intialize` method return `nil` if libavahi and mDNS are unavailable.

This:
- Results in a clear error message if code which was compiled against a
  copy of GNUstep with avahi/mDNS support runs on a copy of GNUstep which
  doesn't have avahi/mDNS support.
- Avoids code which uses `NSNetService` or `NSNetServiceBrowser` to
  successfully compile (because the classes are defined in the header)
  but then failing to link (because there is no implementation for these
  classes).
2024-03-31 11:37:23 +00:00
Frederik Carlier
07d17a16a7 Generate pkg-config configuration file for libs-base
This commit generates a `gnustep-base.pc` file which is installed in `/lib/pkgconfig` and contains the GNUstep base version number, the libraries to link (equivalent to `gnustep-config --base-libs`) with and the C flags to use (equivalent to `gnustep-config --objc-flags`).
2024-03-30 15:56:22 +00:00
rfm
61da0dab96 fix possible dereference of null pointer 2024-03-11 14:36:22 +00:00
hmelder
ca1d07dcf2 Implement +[NSDate now] 2024-03-11 11:48:28 +01:00
rfm
88b73acd8b more leak fixes 2024-03-04 11:52:42 +00:00
rfm
e8813346e5 more leak fixes 2024-03-04 10:49:58 +00:00
rfm
619f902e9b ileak fix 2024-03-04 10:21:35 +00:00
rfm
cd2626e26b Attept fix for deadlock 2024-02-20 16:05:58 +00:00
rfm
f071a8c7d0 imprve debug info a little 2024-02-20 10:08:43 +00:00
ethanc8
a15fa66276 Stylistic changes in -[NSString enumerateSubstringsInRange:options:usingBlock:] 2024-02-17 19:11:05 -06:00
rfm
d988153800 Fix for #361 2024-02-16 14:26:41 +00:00
rfm
92660a5937 Make extra event operate for winsock only 2024-02-13 17:18:42 +00:00
rfm
c4e5ea3d42 partial revert for regression on unix 2024-02-13 16:28:28 +00:00
rfm
d444f1fb3f windows socket fixes 2024-02-13 15:09:43 +00:00
rfm
90e0460466 acceidentally missed from earlier commit 2024-02-13 15:04:23 +00:00
rfm
88e43d73a6 fix incorrect enumeration end parameter 2024-02-13 12:59:12 +00:00