From 2ea2968064e1868cc187754d6d9349c2e68b7734 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Thu, 10 Apr 2008 19:50:36 +0000 Subject: [PATCH] get rid of assert (size >= 0) now that an explicit if (size < 0) is in the code. --- Objects/bytesobject.c | 1 - Objects/stringobject.c | 1 - Objects/unicodeobject.c | 1 - 3 files changed, 3 deletions(-) diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index af7a1b18d96..0b40f8391ea 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -160,7 +160,6 @@ PyBytes_FromStringAndSize(const char *bytes, Py_ssize_t size) PyBytesObject *new; Py_ssize_t alloc; - assert(size >= 0); if (size < 0) { PyErr_SetString(PyExc_SystemError, "Negative size passed to PyBytes_FromStringAndSize"); diff --git a/Objects/stringobject.c b/Objects/stringobject.c index f4b42641f0f..9f154f3e1e4 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -55,7 +55,6 @@ PyObject * PyString_FromStringAndSize(const char *str, Py_ssize_t size) { register PyStringObject *op; - assert(size >= 0); if (size < 0) { PyErr_SetString(PyExc_SystemError, "Negative size passed to PyString_FromStringAndSize"); diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 43379728cbb..a8e0e11cb3e 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -466,7 +466,6 @@ PyObject *PyUnicode_FromStringAndSize(const char *u, Py_ssize_t size) { PyUnicodeObject *unicode; - assert(size <= 0); if (size < 0) { PyErr_SetString(PyExc_SystemError, "Negative size passed to PyUnicode_FromStringAndSize");