use Py_LOCAL also for string and unicode objects

This commit is contained in:
Fredrik Lundh 2006-05-26 11:38:15 +00:00
parent df676c5ffd
commit 95e2a91615
3 changed files with 18 additions and 37 deletions

View file

@ -5,18 +5,6 @@
#include <ctype.h>
#undef USE_INLINE /* XXX - set via configure? */
#if defined(_MSC_VER) /* this is taken from _sre.c */
#pragma warning(disable: 4710)
/* fastest possible local call under MSVC */
#define LOCAL(type) static __inline type __fastcall
#elif defined(USE_INLINE)
#define LOCAL(type) static inline type
#else
#define LOCAL(type) static type
#endif
#ifdef COUNT_ALLOCS
int null_strings, one_strings;
#endif
@ -798,7 +786,7 @@ PyString_AsStringAndSize(register PyObject *obj,
#define FAST_COUNT 0
#define FAST_SEARCH 1
LOCAL(Py_ssize_t)
Py_LOCAL(Py_ssize_t)
fastsearch(const char* s, Py_ssize_t n, const char* p, Py_ssize_t m, int mode)
{
long mask;