Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
g_base64_encode_step: clarify break_lines behavior a bit
Browse files Browse the repository at this point in the history
break_lines uses LFs, not CRLFs like you might expect (since it's
designed for email-related use), but we can't change that now since
the caller has to allocate the output buffer and so the
number-of-bytes-output is part of the ABI. So, just document that.

https://bugzilla.gnome.org/show_bug.cgi?id=668158
  • Loading branch information
danwinship committed Jan 18, 2012
1 parent 08036ce commit 3691194
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions glib/gbase64.c
Expand Up @@ -81,6 +81,9 @@ static const char base64_alphabet[] =
* @break_lines is typically used when putting base64-encoded data in emails.
* It breaks the lines at 72 columns instead of putting all of the text on
* the same line. This avoids problems with long lines in the email system.
* Note however that it breaks the lines with <literal>LF</literal>
* characters, not <literal>CR LF</literal> sequences, so the result cannot
* be passed directly to SMTP or certain other protocols.
*
* Return value: The number of bytes of output that was written
*
Expand Down

0 comments on commit 3691194

Please sign in to comment.