]> granicus.if.org Git - php/commitdiff
Fix some 8bit issues with IRCG nickname encoding and
authorSascha Schumann <sas@php.net>
Sat, 29 Jun 2002 18:46:49 +0000 (18:46 +0000)
committerSascha Schumann <sas@php.net>
Sat, 29 Jun 2002 18:46:49 +0000 (18:46 +0000)
Change the underlying interface of smart_str to accept unsigned char.

ext/standard/php_smart_str.h

index d05e615fe780dcc33498a7fb60ce3835269b31a0..63a0b1b527f9a1682fcb0c1160dd0ac1af4e50d7 100644 (file)
 #define smart_str_append_long(dest, val) smart_str_append_long_ex(dest, val, 0)
 #define smart_str_append_unsigned(dest, val) smart_str_append_unsigned_ex(dest, val, 0)
 
-static inline void smart_str_appendc_ex(smart_str *dest, char c, int what)
+static inline void smart_str_appendc_ex(smart_str *dest, unsigned char c, int what)
 {
        size_t newlen;
 
        smart_str_alloc(dest, 1, what);
        dest->len = newlen;
-       dest->c[dest->len - 1] = c;
+       ((unsigned char *) dest->c)[dest->len - 1] = c;
 }