Issue #5748: bytesobject.c should not have its own private defines for stringlib macros. Also removed unused defines and include for localutil.h.

This commit is contained in:
Eric Smith 2009-11-30 01:01:42 +00:00
parent 7d0bddde5c
commit 0f78bff646
3 changed files with 4 additions and 16 deletions

View File

@ -563,29 +563,15 @@ PyBytes_AsStringAndSize(register PyObject *obj,
/* Methods */ /* Methods */
#include "stringlib/stringdefs.h" #include "stringlib/stringdefs.h"
#define STRINGLIB_CHAR char
#define STRINGLIB_CMP memcmp
#define STRINGLIB_LEN PyBytes_GET_SIZE
#define STRINGLIB_NEW PyBytes_FromStringAndSize
#define STRINGLIB_STR PyBytes_AS_STRING
/* #define STRINGLIB_WANT_CONTAINS_OBJ 1 */
#define STRINGLIB_EMPTY nullstring
#define STRINGLIB_CHECK_EXACT PyBytes_CheckExact
#define STRINGLIB_MUTABLE 0
#include "stringlib/fastsearch.h" #include "stringlib/fastsearch.h"
#include "stringlib/count.h" #include "stringlib/count.h"
#include "stringlib/find.h" #include "stringlib/find.h"
#include "stringlib/partition.h" #include "stringlib/partition.h"
#include "stringlib/ctype.h" #include "stringlib/ctype.h"
#include "stringlib/transmogrify.h"
#define _Py_InsertThousandsGrouping _PyBytes_InsertThousandsGrouping #define STRINGLIB_MUTABLE 0
#define _Py_InsertThousandsGroupingLocale _PyBytes_InsertThousandsGroupingLocale #include "stringlib/transmogrify.h"
#include "stringlib/localeutil.h"
PyObject * PyObject *
PyBytes_Repr(PyObject *obj, int smartquotes) PyBytes_Repr(PyObject *obj, int smartquotes)

View File

@ -21,6 +21,7 @@
#define STRINGLIB_NEW PyBytes_FromStringAndSize #define STRINGLIB_NEW PyBytes_FromStringAndSize
#define STRINGLIB_RESIZE _PyBytes_Resize #define STRINGLIB_RESIZE _PyBytes_Resize
#define STRINGLIB_CHECK PyBytes_Check #define STRINGLIB_CHECK PyBytes_Check
#define STRINGLIB_CHECK_EXACT PyBytes_CheckExact
#define STRINGLIB_CMP memcmp #define STRINGLIB_CMP memcmp
#define STRINGLIB_TOSTR PyObject_Str #define STRINGLIB_TOSTR PyObject_Str
#define STRINGLIB_GROUPING _PyBytes_InsertThousandsGrouping #define STRINGLIB_GROUPING _PyBytes_InsertThousandsGrouping

View File

@ -21,6 +21,7 @@
#define STRINGLIB_NEW PyUnicode_FromUnicode #define STRINGLIB_NEW PyUnicode_FromUnicode
#define STRINGLIB_RESIZE PyUnicode_Resize #define STRINGLIB_RESIZE PyUnicode_Resize
#define STRINGLIB_CHECK PyUnicode_Check #define STRINGLIB_CHECK PyUnicode_Check
#define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact
#define STRINGLIB_GROUPING _PyUnicode_InsertThousandsGrouping #define STRINGLIB_GROUPING _PyUnicode_InsertThousandsGrouping
#define STRINGLIB_GROUPING_LOCALE _PyUnicode_InsertThousandsGroupingLocale #define STRINGLIB_GROUPING_LOCALE _PyUnicode_InsertThousandsGroupingLocale