summaryrefslogtreecommitdiffstats
path: root/PC/_msi.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 (GMT)
commit72b710a59617ebe6dd1c41613d2c7eb81702efd9 (patch)
treecd134cc11c49ba09f50e44a9f36b69f2b0ffc893 /PC/_msi.c
parent9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (diff)
downloadcpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.zip
cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.gz
cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.bz2
Renamed PyString to PyBytes
Diffstat (limited to 'PC/_msi.c')
-rw-r--r--PC/_msi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/PC/_msi.c b/PC/_msi.c
index 43fe32b..5b68bc2 100644
--- a/PC/_msi.c
+++ b/PC/_msi.c
@@ -35,7 +35,7 @@ uuidcreate(PyObject* obj, PyObject*args)
return NULL;
}
- oresult = PyString_FromString(cresult);
+ oresult = PyBytes_FromString(cresult);
RpcStringFree(&cresult);
return oresult;
@@ -136,14 +136,14 @@ static FNFCIGETNEXTCABINET(cb_getnextcabinet)
PyObject *result = PyObject_CallMethod(pv, "getnextcabinet", "i", pccab->iCab);
if (result == NULL)
return -1;
- if (!PyString_Check(result)) {
+ if (!PyBytes_Check(result)) {
PyErr_Format(PyExc_TypeError,
"Incorrect return type %s from getnextcabinet",
result->ob_type->tp_name);
Py_DECREF(result);
return FALSE;
}
- strncpy(pccab->szCab, PyString_AsString(result), sizeof(pccab->szCab));
+ strncpy(pccab->szCab, PyBytes_AsString(result), sizeof(pccab->szCab));
return TRUE;
}
return FALSE;
@@ -507,7 +507,7 @@ summary_getproperty(msiobj* si, PyObject *args)
PyErr_SetString(PyExc_NotImplementedError, "FILETIME result");
return NULL;
case VT_LPSTR:
- result = PyString_FromStringAndSize(sval, ssize);
+ result = PyBytes_FromStringAndSize(sval, ssize);
if (sval != sbuf)
free(sval);
return result;
@@ -539,9 +539,9 @@ summary_setproperty(msiobj* si, PyObject *args)
if (!PyArg_ParseTuple(args, "iO:SetProperty", &field, &data))
return NULL;
- if (PyString_Check(data)) {
+ if (PyBytes_Check(data)) {
status = MsiSummaryInfoSetProperty(si->h, field, VT_LPSTR,
- 0, NULL, PyString_AsString(data));
+ 0, NULL, PyBytes_AsString(data));
} else if (PyLong_CheckExact(data)) {
long value = PyLong_AsLong(data);
if (value == -1 && PyErr_Occurred()) {