mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Keep Microsoft's compiler happy.
This commit is contained in:
parent
c3da02e904
commit
e0fdf6f1a8
1 changed files with 1 additions and 4 deletions
|
@ -250,7 +250,6 @@ set_bases(c, v)
|
||||||
PyClassObject *c;
|
PyClassObject *c;
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
{
|
{
|
||||||
PyObject *temp;
|
|
||||||
int i, n;
|
int i, n;
|
||||||
|
|
||||||
if (v == NULL || !PyTuple_Check(v))
|
if (v == NULL || !PyTuple_Check(v))
|
||||||
|
@ -272,11 +271,9 @@ set_name(c, v)
|
||||||
PyClassObject *c;
|
PyClassObject *c;
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
{
|
{
|
||||||
PyObject *temp;
|
|
||||||
|
|
||||||
if (v == NULL || !PyString_Check(v))
|
if (v == NULL || !PyString_Check(v))
|
||||||
return "__name__ must be a string object";
|
return "__name__ must be a string object";
|
||||||
if (strlen(PyString_AS_STRING(v)) != PyString_GET_SIZE(v))
|
if ((long)strlen(PyString_AS_STRING(v)) != PyString_GET_SIZE(v))
|
||||||
return "__name__ must not contain null bytes";
|
return "__name__ must not contain null bytes";
|
||||||
set_slot(&c->cl_name, v);
|
set_slot(&c->cl_name, v);
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue