Re: Re: php-src /ext/com_dotnet com_handlers.c com_variant.c
| From: | Wez Furlong | Date: | Sat, 13 Aug 2005 20:16:49 +0000 |
| Subject: | Re: Re: php-src /ext/com_dotnet com_handlers.c com_variant.c | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17988@lists.php.net to get a copy of this message | ||
Umm, don't we use UCS2 internally?
--Wez.
On 8/13/05, cshmoove@bellsouth.net <cshmoove@bellsouth.net> wrote:
> Wez,
>
> > + case IS_UNICODE:
> > + V_VT(v) = VT_BSTR;
> > + V_BSTR(v) = SysAllocString(Z_USTRVAL_P(z));
> > + break;
>
> my understanding is that Win32 uses UCS2, so do we need to account for
> surrogates ?
>
> l0t3k
> ""Wez Furlong"" <wez@php.net> wrote in message
> news:cvswez1123959839@cvsserver...
> > wez Sat Aug 13 15:03:59 2005 EDT
> >
> > Modified files:
> > /php-src/ext/com_dotnet com_handlers.c com_variant.c
> > Log:
> > unicode enable COM parameters (but not method/property names yet)
> >
> >
> >
> > http://cvs.php.net/diff.php/php-src/ext/com_dotnet/com_handlers.c?r1=1.30&r2=1.31&ty=u
> > Index: php-src/ext/com_dotnet/com_handlers.c
> > diff -u php-src/ext/com_dotnet/com_handlers.c:1.30
> > php-src/ext/com_dotnet/com_handlers.c:1.31
> > --- php-src/ext/com_dotnet/com_handlers.c:1.30 Wed Aug 3 10:06:41 2005
> > +++ php-src/ext/com_dotnet/com_handlers.c Sat Aug 13 15:03:58 2005
> > @@ -16,7 +16,7 @@
> >
> > +----------------------------------------------------------------------+
> > */
> >
> > -/* $Id: com_handlers.c,v 1.30 2005/08/03 14:06:41 sniper Exp $ */
> > +/* $Id: com_handlers.c,v 1.31 2005/08/13 19:03:58 wez Exp $ */
> >
> > #ifdef HAVE_CONFIG_H
> > #include "config.h"
> > @@ -522,6 +522,7 @@
> > vt = VT_BOOL;
> > break;
> > case IS_STRING:
> > + case IS_UNICODE:
> > vt = VT_BSTR;
> > break;
> > default:
> >
> > http://cvs.php.net/diff.php/php-src/ext/com_dotnet/com_variant.c?r1=1..12&r2=1.13&ty=u
> > Index: php-src/ext/com_dotnet/com_variant.c
> > diff -u php-src/ext/com_dotnet/com_variant.c:1.12
> > php-src/ext/com_dotnet/com_variant.c:1.13
> > --- php-src/ext/com_dotnet/com_variant.c:1.12 Fri Aug 12 22:23:27 2005
> > +++ php-src/ext/com_dotnet/com_variant.c Sat Aug 13 15:03:58 2005
> > @@ -16,7 +16,7 @@
> >
> > +----------------------------------------------------------------------+
> > */
> >
> > -/* $Id: com_variant.c,v 1.12 2005/08/13 02:23:27 wez Exp $ */
> > +/* $Id: com_variant.c,v 1.13 2005/08/13 19:03:58 wez Exp $ */
> >
> > #ifdef HAVE_CONFIG_H
> > #include "config.h"
> > @@ -157,6 +157,11 @@
> > efree(olestring);
> > break;
> >
> > + case IS_UNICODE:
> > + V_VT(v) = VT_BSTR;
> > + V_BSTR(v) = SysAllocString(Z_USTRVAL_P(z));
> > + break;
> > +
> > case IS_RESOURCE:
> > case IS_CONSTANT:
> > case IS_CONSTANT_ARRAY:
> > @@ -211,12 +216,8 @@
> > ZVAL_BOOL(z, V_BOOL(v) ? 1 : 0);
> > break;
> > case VT_BSTR:
> > - olestring = V_BSTR(v);
> > - if (olestring) {
> > - Z_TYPE_P(z) = IS_STRING;
> > - Z_STRVAL_P(z) = php_com_olestring_to_string(olestring,
> > - &Z_STRLEN_P(z), codepage TSRMLS_CC);
> > - olestring = NULL;
> > + if (V_BSTR(v)) {
> > + ZVAL_UNICODE(z, V_BSTR(v), 1);
> > }
> > break;
> > case VT_UNKNOWN:
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>