Bug #11880 » blankstr.patch
win32ole.c Sat Dec 26 23:52:40 2015 | ||
---|---|---|
/* do not type-conversion here to prevent from other arguments
|
||
* changing (if exist) */
|
||
Check_Type(vstr, T_STRING);
|
||
if (RSTRING_LEN(vstr) == 0)
|
||
{
|
||
return NULL;
|
||
}
|
||
|
||
enc = rb_enc_get(vstr);
|
||
|
||
... | ... | |
case VT_BSTR:
|
||
{
|
||
if(V_ISBYREF(pvar))
|
||
obj = ole_wc2vstr(*V_BSTRREF(pvar), FALSE);
|
||
{
|
||
obj = (SysStringLen(*V_BSTRREF(pvar)) == 0)
|
||
? rb_str_new2("")
|
||
: ole_wc2vstr(*V_BSTRREF(pvar), FALSE);
|
||
}
|
||
else
|
||
obj = ole_wc2vstr(V_BSTR(pvar), FALSE);
|
||
{
|
||
obj = (SysStringLen(V_BSTR(pvar)) == 0)
|
||
? rb_str_new2("")
|
||
: ole_wc2vstr(V_BSTR(pvar), FALSE);
|
||
}
|
||
break;
|
||
}
|
||
|