Author: mlytwyn
Date: Wed Sep 14 16:20:19 2016
New Revision: 40082
URL: http://svn.gna.org/viewcvs/gnustep?rev=40082&view=rev
Log:
Merges with base trunk revision 40072
Modified:
libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetService.m
libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetServiceBrowser.m
libs/base/branches/gnustep_testplant_branch/Source/GSConcreteValueTemplate.m
libs/base/branches/gnustep_testplant_branch/Source/GSCountedSet.m
libs/base/branches/gnustep_testplant_branch/Source/GSFFCallInvocation.m
libs/base/branches/gnustep_testplant_branch/Source/GSFFIInvocation.m
Modified: libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetService.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetService.m?rev=40082&r1=40081&r2=40082&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetService.m
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetService.m
Wed Sep 14 16:20:19 2016
@@ -881,7 +881,19 @@
}
//Create the entry group:
- _entryGroup = avahi_entry_group_new((AvahiClient*)_client,
GSAvahiEntryGroupStateChanged, (void*)self);
+ if (NULL != _client)
+ {
+ _entryGroup = avahi_entry_group_new((AvahiClient*)_client,
+ GSAvahiEntryGroupStateChanged,
+ (void*)self);
+ }
+ else
+ {
+ // having no _client usually means that avahi-daemon (or dbus)
+ // isn't running, unfortunately there's no precise errNo at this point
+ // so we're providing just our best guess
+ return AVAHI_ERR_NO_DAEMON;
+ }
// Handle error:
if (NULL == _entryGroup)
@@ -1058,9 +1070,9 @@
}
}
- [_lock unlock];
+ [_lock unlock];
return ret == 0 ? YES : NO;
- }
+}
- (BOOL) addServiceRecord
{
@@ -1072,10 +1084,11 @@
[_lock lock];
if (_entryGroup == NULL)
{
- if (NO == [self addServiceRecordWithOptions: options])
- {
- [self handleError: avahi_client_errno((AvahiClient*)_client)];
- }
+ if (NO == [self addServiceRecordWithOptions: options])
+ {
+ [self handleError: _client ?
avahi_client_errno((AvahiClient*)_client)
+ : AVAHI_ERR_NO_DAEMON];
+ }
}
[self commitEntryGroup];
[_lock unlock];
@@ -1219,7 +1232,7 @@
_entryGroup = NULL;
}
- if (0 != NSCountMapTable(_browsers))
+ if ((_browsers != NULL) && (0 != NSCountMapTable(_browsers)))
{
NSMapTable *enumerationTable;
NSMapEnumerator bEnum;
Modified:
libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetServiceBrowser.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetServiceBrowser.m?rev=40082&r1=40081&r2=40082&view=diff
==============================================================================
---
libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetServiceBrowser.m
(original)
+++
libs/base/branches/gnustep_testplant_branch/Source/GSAvahiNetServiceBrowser.m
Wed Sep 14 16:20:19 2016
@@ -290,6 +290,7 @@
{
err = NSNetServicesActivityInProgress;
}
+ // Testplant-MAL-09142016: Added error check...
else if (_client == NULL)
{
err = NSNetServicesInvalidError;
@@ -484,6 +485,7 @@
}
_type = GSAvahiUnknownBrowser;
+ // Testplant-MAL-09142016: Added closing sequence...
{
GSAvahiNetService *service = nil;
NSEnumerator *iter = [_services objectEnumerator];
Modified:
libs/base/branches/gnustep_testplant_branch/Source/GSConcreteValueTemplate.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/GSConcreteValueTemplate.m?rev=40082&r1=40081&r2=40082&view=diff
==============================================================================
---
libs/base/branches/gnustep_testplant_branch/Source/GSConcreteValueTemplate.m
(original)
+++
libs/base/branches/gnustep_testplant_branch/Source/GSConcreteValueTemplate.m
Wed Sep 14 16:20:19 2016
@@ -90,17 +90,7 @@
* Ensure that the version encoded is that used by the abstract class.
*/
[self setVersion: [super version]];
-#if TYPE_ORDER == 0 && GS_WITH_GC
- GSMakeWeakPointer(self, "data");
-#endif
-}
-
-#if TYPE_ORDER == 0 && GS_WITH_GC
-- (void) finalize
-{
- GSAssignZeroingWeakPointer((void**)&data, (void*)nil);
-}
-#endif
+}
// Allocating and Initializing
@@ -109,11 +99,7 @@
{
typedef __typeof__(data) _dt;
self = [super init];
-#if TYPE_ORDER == 0 && GS_WITH_GC
- GSAssignZeroingWeakPointer((void**)&data, (void*)(*(id*)value));
-#else
data = *(_dt *)value;
-#endif
return self;
}
Modified: libs/base/branches/gnustep_testplant_branch/Source/GSCountedSet.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/GSCountedSet.m?rev=40082&r1=40081&r2=40082&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/GSCountedSet.m
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/GSCountedSet.m Wed Sep
14 16:20:19 2016
@@ -36,13 +36,6 @@
#define GSI_MAP_KTYPES GSUNION_OBJ
#define GSI_MAP_VTYPES GSUNION_NSINT
-#if GS_WITH_GC
-#include <gc/gc_typed.h>
-static GC_descr nodeDesc; // Type descriptor for map node.
-#define GSI_MAP_NODES(M, X) \
-(GSIMapNode)GC_calloc_explicitly_typed(X, sizeof(GSIMapNode_t), nodeDesc)
-#endif
-
#include "GNUstepBase/GSIMap.h"
@interface GSCountedSet : NSCountedSet
@@ -101,14 +94,6 @@
{
if (self == [GSCountedSet class])
{
-#if GS_WITH_GC
- /* We create a typed memory descriptor for map nodes.
- * Only the pointer to the key needs to be scanned.
- */
- GC_word w[GC_BITMAP_SIZE(GSIMapNode_t)] = {0};
- GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, key));
- nodeDesc = GC_make_descriptor(w, GC_WORD_LEN(GSIMapNode_t));
-#endif
}
}
@@ -374,13 +359,11 @@
{
result = node->key.obj;
node->value.nsu++;
-#if !GS_WITH_GC
if (result != anObject)
{
[anObject release];
[result retain];
}
-#endif
}
_version++;
return result;
Modified:
libs/base/branches/gnustep_testplant_branch/Source/GSFFCallInvocation.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/GSFFCallInvocation.m?rev=40082&r1=40081&r2=40082&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/GSFFCallInvocation.m
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/GSFFCallInvocation.m
Wed Sep 14 16:20:19 2016
@@ -602,18 +602,18 @@
av_start_ptr(alist, imp, char *, retval);
break;
- CASE_TYPE(_C_CHR, char, av_start_char)
- CASE_TYPE(_C_UCHR, unsigned char, av_start_uchar)
- CASE_TYPE(_C_SHT, short, av_start_short)
- CASE_TYPE(_C_USHT, unsigned short, av_start_ushort)
- CASE_TYPE(_C_INT, int, av_start_int)
- CASE_TYPE(_C_UINT, unsigned int, av_start_uint)
- CASE_TYPE(_C_LNG, long, av_start_long)
- CASE_TYPE(_C_ULNG, unsigned long, av_start_ulong)
- CASE_TYPE(_C_LNG_LNG, long long, av_start_longlong)
- CASE_TYPE(_C_ULNG_LNG, unsigned long long, av_start_ulonglong)
- CASE_TYPE(_C_FLT, float, av_start_float)
- CASE_TYPE(_C_DBL, double, av_start_double)
+ CASE_TYPE(_C_CHR, char, av_start_char)
+ CASE_TYPE(_C_UCHR, unsigned char, av_start_uchar)
+ CASE_TYPE(_C_SHT, short, av_start_short)
+ CASE_TYPE(_C_USHT, unsigned short, av_start_ushort)
+ CASE_TYPE(_C_INT, int, av_start_int)
+ CASE_TYPE(_C_UINT, unsigned int, av_start_uint)
+ CASE_TYPE(_C_LNG, long, av_start_long)
+ CASE_TYPE(_C_ULNG, unsigned long, av_start_ulong)
+ CASE_TYPE(_C_LNG_LNG, long long, av_start_longlong)
+ CASE_TYPE(_C_ULNG_LNG, unsigned long long, av_start_ulonglong)
+ CASE_TYPE(_C_FLT, float, av_start_float)
+ CASE_TYPE(_C_DBL, double, av_start_double)
#if __GNUC__ > 2 && defined(_C_BOOL)
CASE_TYPE(_C_BOOL, _Bool, av_start_uchar)
#endif
@@ -707,18 +707,18 @@
break;
}
- CASE_TYPE(_C_CHR, char, av_char)
- CASE_TYPE(_C_UCHR, unsigned char, av_uchar)
- CASE_TYPE(_C_SHT, short, av_short)
- CASE_TYPE(_C_USHT, unsigned short, av_ushort)
- CASE_TYPE(_C_INT, int, av_int)
- CASE_TYPE(_C_UINT, unsigned int, av_uint)
- CASE_TYPE(_C_LNG, long, av_long)
- CASE_TYPE(_C_ULNG, unsigned long, av_ulong)
- CASE_TYPE(_C_LNG_LNG, long long, av_longlong)
- CASE_TYPE(_C_ULNG_LNG, unsigned long long, av_ulonglong)
- CASE_TYPE(_C_FLT, float, av_float)
- CASE_TYPE(_C_DBL, double, av_double)
+ CASE_TYPE(_C_CHR, char, av_char)
+ CASE_TYPE(_C_UCHR, unsigned char, av_uchar)
+ CASE_TYPE(_C_SHT, short, av_short)
+ CASE_TYPE(_C_USHT, unsigned short, av_ushort)
+ CASE_TYPE(_C_INT, int, av_int)
+ CASE_TYPE(_C_UINT, unsigned int, av_uint)
+ CASE_TYPE(_C_LNG, long, av_long)
+ CASE_TYPE(_C_ULNG, unsigned long, av_ulong)
+ CASE_TYPE(_C_LNG_LNG, long long, av_longlong)
+ CASE_TYPE(_C_ULNG_LNG, unsigned long long, av_ulonglong)
+ CASE_TYPE(_C_FLT, float, av_float)
+ CASE_TYPE(_C_DBL, double, av_double)
#if __GNUC__ > 2 && defined(_C_BOOL)
CASE_TYPE(_C_BOOL, _Bool, av_uchar)
#endif
Modified: libs/base/branches/gnustep_testplant_branch/Source/GSFFIInvocation.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/GSFFIInvocation.m?rev=40082&r1=40081&r2=40082&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/GSFFIInvocation.m
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/GSFFIInvocation.m
Wed Sep 14 16:20:19 2016
@@ -57,29 +57,6 @@
typedef void (*f_fun) ();
static void GSFFIInvocationCallback(ffi_cif*, void*, void **, void*);
-
-/*
- * If we are using the GNU ObjC runtime we could simplify this
- * function quite a lot because this function is already present in
- * the ObjC runtime. However, it is not part of the public API, so we
- * work around it.
- */
-
-GS_STATIC_INLINE GSMethod
-gs_method_for_receiver_and_selector (id receiver, SEL sel)
-{
- if (receiver)
- {
- return GSGetMethod((GSObjCIsInstance(receiver)
- ? object_getClass(receiver) : (Class)receiver),
- sel,
- GSObjCIsInstance(receiver),
- YES);
- }
-
- return 0;
-}
-
/* This routine should return a typed selector corresponding to the
name of the specified selector. If there is only one type, then we
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs