Author: rfm
Date: Mon Mar  6 10:27:58 2017
New Revision: 40363

URL: http://svn.gna.org/viewcvs/gnustep?rev=40363&view=rev
Log:
-setDebug: selector types tweak

Modified:
    libs/ec/trunk/ChangeLog
    libs/ec/trunk/EcAlarmDestination.h
    libs/ec/trunk/EcAlarmDestination.m

Modified: libs/ec/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/ChangeLog?rev=40363&r1=40362&r2=40363&view=diff
==============================================================================
--- libs/ec/trunk/ChangeLog     (original)
+++ libs/ec/trunk/ChangeLog     Mon Mar  6 10:27:58 2017
@@ -1,3 +1,10 @@
+2017-03-06  Richard Frith-Macdonald <[email protected]>
+
+       * EcAlarmDestination.h:
+       * EcAlarmDestination.m:
+       Change signature of -setDebug: method to be consistent with other
+       classes using a method of the same name.
+
 2017-01-30  Wolfgang Lux  <[email protected]>
 
        * EcAlarmSinkSNMP.m (pollHeartBeat_handler): Don't use memdup,

Modified: libs/ec/trunk/EcAlarmDestination.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcAlarmDestination.h?rev=40363&r1=40362&r2=40363&view=diff
==============================================================================
--- libs/ec/trunk/EcAlarmDestination.h  (original)
+++ libs/ec/trunk/EcAlarmDestination.h  Mon Mar  6 10:27:58 2017
@@ -174,10 +174,11 @@
 - (BOOL) setCoalesce: (BOOL)coalesce;
 
 /** Sets debug on/off.  When debugging is on, we generate logs of
- * forwarding to the destination and of coalescing of alams.<br />
+ * forwarding to the destination and of coalescing of alarms.<br />
+ * Any non-zero value sets debug to YES, zero sets it to NO.<br />
  * Returns the previous value of the setting.
  */
-- (BOOL) setDebug: (BOOL)debug;
+- (int) setDebug: (int)debug;
 
 /** Sets the destination to which alarms should be forwarded.<br />
  * If nil this turns off forwarding until it is re-set to a non-nil

Modified: libs/ec/trunk/EcAlarmDestination.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcAlarmDestination.m?rev=40363&r1=40362&r2=40363&view=diff
==============================================================================
--- libs/ec/trunk/EcAlarmDestination.m  (original)
+++ libs/ec/trunk/EcAlarmDestination.m  Mon Mar  6 10:27:58 2017
@@ -366,15 +366,19 @@
   return old;
 }
 
-- (BOOL) setDebug: (BOOL)debug
+/* Much software uses integer settings for debub levels, so to selector
+ * type conflicts we use the same convention even though we are using it
+ * as a boolean.
+ */
+- (int) setDebug: (int)debug
 {
   BOOL old;
 
   [_alarmLock lock];
   old = _debug;
-  _debug = (YES == debug) ? YES : NO;
+  _debug = debug ? YES : NO;
   [_alarmLock unlock];
-  return old;
+  return (int)old;
 }
 
 - (id<EcAlarmDestination>) setDestination: (id<EcAlarmDestination>)destination


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to