jani            Mon Nov  5 12:07:28 2007 UTC

  Modified files:              
    /php-src/ext/standard       base64.c 
  Log:
  - ws + cs + nuke a warning
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/base64.c?r1=1.53&r2=1.54&diff_format=u
Index: php-src/ext/standard/base64.c
diff -u php-src/ext/standard/base64.c:1.53 php-src/ext/standard/base64.c:1.54
--- php-src/ext/standard/base64.c:1.53  Sat Jul 21 01:23:37 2007
+++ php-src/ext/standard/base64.c       Mon Nov  5 12:07:28 2007
@@ -15,7 +15,7 @@
    | Author: Jim Winstead <[EMAIL PROTECTED]>                                  
|
    +----------------------------------------------------------------------+
  */
-/* $Id: base64.c,v 1.53 2007/07/21 01:23:37 jani Exp $ */
+/* $Id: base64.c,v 1.54 2007/11/05 12:07:28 jani Exp $ */
 
 #include <string.h>
 
@@ -23,13 +23,13 @@
 #include "base64.h"
 
 /* {{{ base64 tables */
-static const char base64_table[] =
-       { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
-         'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
-         'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
-         'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
-         '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '\0'
-       };
+static const char base64_table[] = {
+       'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
+       'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+       'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
+       'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+       '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '\0'
+};
 
 static const char base64_pad = '=';
 
@@ -146,9 +146,9 @@
        int ch, i = 0, j = 0, k;
        /* this sucks for threaded environments */
        unsigned char *result;
-       
+
        result = (unsigned char *)safe_emalloc(length, 1, 1);
-       
+
        /* run through the whole string, converting as we go */
        while ((ch = *current++) != '\0' && length-- > 0) {
                if (ch == base64_pad) break;
@@ -233,7 +233,7 @@
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &str, 
&str_len, &strict) == FAILURE) {
                return;
        }
-       result = php_base64_decode_ex(str, str_len, &ret_length, strict);
+       result = php_base64_decode_ex((unsigned char*)str, str_len, 
&ret_length, strict);
        if (result != NULL) {
                RETVAL_STRINGL((char*)result, ret_length, 0);
        } else {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to