Author: rfm
Date: Mon Mar  6 10:56:33 2017
New Revision: 40367

URL: http://svn.gna.org/viewcvs/gnustep?rev=40367&view=rev
Log:
more setDebug: tweaks

Modified:
    libs/webservices/trunk/ChangeLog
    libs/webservices/trunk/GWSService.h
    libs/webservices/trunk/GWSService.m

Modified: libs/webservices/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webservices/trunk/ChangeLog?rev=40367&r1=40366&r2=40367&view=diff
==============================================================================
--- libs/webservices/trunk/ChangeLog    (original)
+++ libs/webservices/trunk/ChangeLog    Mon Mar  6 10:56:33 2017
@@ -2,6 +2,8 @@
 
        * GSWCoder.h:
        * GSWCoder.m:
+       * GSWService.h:
+       * GSWService.m:
         Change signature of -setDebug: method to be consistent with other
        classes using a method of the same name.
        Add option to preserve white space when parsing XML.

Modified: libs/webservices/trunk/GWSService.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webservices/trunk/GWSService.h?rev=40367&r1=40366&r2=40367&view=diff
==============================================================================
--- libs/webservices/trunk/GWSService.h (original)
+++ libs/webservices/trunk/GWSService.h Mon Mar  6 10:56:33 2017
@@ -326,9 +326,11 @@
 - (void) setContentType: (NSString*)cType;
 
 /** Specifies whether debug information is enabled.  See -debug for more
- * information.
- */
-- (void) setDebug: (BOOL)flag;
+ * information.<br />
+ * A non-zero setting sets debg to YES while a zero setting sets it to NO.
+ * The method returns the previous setting.
+ */
+- (int) setDebug: (int)flag;
 
 /**
  * Sets the delegate object which will receive callbacks when an RPC

Modified: libs/webservices/trunk/GWSService.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webservices/trunk/GWSService.m?rev=40367&r1=40366&r2=40367&view=diff
==============================================================================
--- libs/webservices/trunk/GWSService.m (original)
+++ libs/webservices/trunk/GWSService.m Mon Mar  6 10:56:33 2017
@@ -128,11 +128,11 @@
 
 #if    defined(GNUSTEP)
 @interface     NSURLHandle (Debug)
-- (void) setDebug: (BOOL)flag;
+- (int) setDebug: (int)flag;
 - (void) setReturnAll: (BOOL)flag;
 @end
 @interface     NSURLRequest (Debug)
-- (void) setDebug: (BOOL)flag;
+- (int) setDebug: (int)flag;
 @end
 #endif
 
@@ -1635,9 +1635,16 @@
     }
 }
 
-- (void) setDebug: (BOOL)flag
-{
-  _debug = flag;
+/* 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)flag
+{
+  BOOL  old = _debug;
+
+  _debug = flag ? YES : NO;
+  return old;
 }
 
 - (void) setDelegate: (id)aDelegate


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

Reply via email to