PyXPCOM: some strings were being terminated at the first \0, and some extra

tests.  Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@141590 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mhammond%skippinet.com.au
2003-04-22 11:54:40 +00:00
parent 55e23a5a18
commit 3068ede9bc
4 changed files with 42 additions and 19 deletions

View File

@@ -2183,7 +2183,7 @@ nsresult PyXPCOM_GatewayVariantHelper::BackFillVariant( PyObject *val, int index
val_use = PyUnicode_FromObject(val);
NS_ABORT_IF_FALSE(PyUnicode_Check(val_use), "PyUnicode_FromObject didnt return a Unicode object!");
const PRUnichar *sz = PyUnicode_AS_UNICODE(val_use);
ws->Assign(sz);
ws->Assign(sz, PyUnicode_GET_SIZE(val_use));
}
break;
}
@@ -2200,7 +2200,7 @@ nsresult PyXPCOM_GatewayVariantHelper::BackFillVariant( PyObject *val, int index
val_use = PyObject_Str(val);
NS_ABORT_IF_FALSE(PyString_Check(val_use), "PyObject_Str didnt return a string object!");
const char *sz = PyString_AS_STRING(val_use);
ws->Assign(sz);
ws->Assign(sz, PyString_Size(val_use));
}
break;
}
@@ -2221,7 +2221,7 @@ nsresult PyXPCOM_GatewayVariantHelper::BackFillVariant( PyObject *val, int index
}
NS_ABORT_IF_FALSE(PyString_Check(val_use), "must have a string object!");
const char *sz = PyString_AS_STRING(val_use);
ws->Assign(sz);
ws->Assign(sz, PyString_Size(val_use));
}
break;
}