Ben Collins-Sussman wrote:
>
> On Mar 13, 2005, at 8:56 AM, Martin Hauner wrote:
>
>>
>> If you think it should be not 0, i can create a doc patch for it.
>
>
> Hm, yes, would you do that? :-)
Here we go... 2 versions, i guess the second is the better one.
> We had a discussion about these sorts of APIs earlier this week on the
> list; in general, we decided that NULL input parameters are not allowed
> unless the docstring explicitly says so. In that same spirit, I think
> that fields of any sort of auth credential structure shouldn't come back
> as NULL unless the docstring explicitly says so.
Hmm, that somehow makes the patch unecessary...
But i think the doc patch is usefull anyway because the password is kind
of "optional" and it is nice to know in this case to use an empty string
instead of a 0 pointer.
--
Martin
Subcommander, http://subcommander.tigris.org
a x-platform Win32/Unix svn gui (qt) client & a text diff/merge tool.
Index: subversion/include/svn_auth.h
===================================================================
--- subversion/include/svn_auth.h (revision 13396)
+++ subversion/include/svn_auth.h (working copy)
@@ -155,7 +155,11 @@
-/** Specific types of credentials **/
+/** Specific types of credentials
+ *
+ * username, password or file pointers are expected to be non zero. Use the
+ * empty string (ie. "") for and empty or unspecified value.
+ */
/** Simple username/password pair credential kind.
*
Index: subversion/include/svn_auth.h
===================================================================
--- subversion/include/svn_auth.h (revision 13396)
+++ subversion/include/svn_auth.h (working copy)
@@ -170,9 +170,11 @@
/** @c SVN_AUTH_CRED_SIMPLE credentials. */
typedef struct svn_auth_cred_simple_t
{
- /** Username */
+ /** Username. Expected to be non zero. Use the empty string (ie. "") for
+ * and empty or unspecified username.
+ */
const char *username;
- /** Password */
+ /** Password. Expected to be non zero. See above. */
const char *password;
/** Indicates if the credentials may be saved (to disk). For example, a
* GUI prompt implementation with a remember password checkbox shall set
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 14 19:03:13 2005