Mercurial > cpython-lru_cache-weakref
diff Include/stringobject.h @ 13445:091ca6b9348f legacy-trunk
ANSI-fication and Py_PROTO extermination.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Sun, 09 Jul 2000 00:55:06 +0000 |
| parents | bfe22cf6e770 |
| children | 6f6f965c5e2d |
line wrap: on
line diff
--- a/Include/stringobject.h Sun Jul 09 00:20:36 2000 +0000 +++ b/Include/stringobject.h Sun Jul 09 00:55:06 2000 +0000 @@ -1,9 +1,3 @@ -#ifndef Py_STRINGOBJECT_H -#define Py_STRINGOBJECT_H -#ifdef __cplusplus -extern "C" { -#endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. @@ -16,6 +10,12 @@ /* String object interface */ +#ifndef Py_STRINGOBJECT_H +#define Py_STRINGOBJECT_H +#ifdef __cplusplus +extern "C" { +#endif + /* Type PyStringObject represents a character string. An extra zero byte is reserved at the end to ensure it is zero-terminated, but a size is @@ -46,32 +46,32 @@ #endif typedef struct { - PyObject_VAR_HEAD + PyObject_VAR_HEAD #ifdef CACHE_HASH - long ob_shash; + long ob_shash; #endif #ifdef INTERN_STRINGS - PyObject *ob_sinterned; + PyObject *ob_sinterned; #endif - char ob_sval[1]; + char ob_sval[1]; } PyStringObject; extern DL_IMPORT(PyTypeObject) PyString_Type; #define PyString_Check(op) ((op)->ob_type == &PyString_Type) -extern DL_IMPORT(PyObject *) PyString_FromStringAndSize Py_PROTO((const char *, int)); -extern DL_IMPORT(PyObject *) PyString_FromString Py_PROTO((const char *)); -extern DL_IMPORT(int) PyString_Size Py_PROTO((PyObject *)); -extern DL_IMPORT(char *) PyString_AsString Py_PROTO((PyObject *)); -extern DL_IMPORT(void) PyString_Concat Py_PROTO((PyObject **, PyObject *)); -extern DL_IMPORT(void) PyString_ConcatAndDel Py_PROTO((PyObject **, PyObject *)); -extern DL_IMPORT(int) _PyString_Resize Py_PROTO((PyObject **, int)); -extern DL_IMPORT(PyObject *) PyString_Format Py_PROTO((PyObject *, PyObject *)); +extern DL_IMPORT(PyObject *) PyString_FromStringAndSize(const char *, int); +extern DL_IMPORT(PyObject *) PyString_FromString(const char *); +extern DL_IMPORT(int) PyString_Size(PyObject *); +extern DL_IMPORT(char *) PyString_AsString(PyObject *); +extern DL_IMPORT(void) PyString_Concat(PyObject **, PyObject *); +extern DL_IMPORT(void) PyString_ConcatAndDel(PyObject **, PyObject *); +extern DL_IMPORT(int) _PyString_Resize(PyObject **, int); +extern DL_IMPORT(PyObject *) PyString_Format(PyObject *, PyObject *); #ifdef INTERN_STRINGS -extern DL_IMPORT(void) PyString_InternInPlace Py_PROTO((PyObject **)); -extern DL_IMPORT(PyObject *) PyString_InternFromString Py_PROTO((const char *)); +extern DL_IMPORT(void) PyString_InternInPlace(PyObject **); +extern DL_IMPORT(PyObject *) PyString_InternFromString(const char *); #else #define PyString_InternInPlace(p) #define PyString_InternFromString(cp) PyString_FromString(cp)
