diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/abstract.h | 3 | ||||
-rw-r--r-- | Include/osdefs.h | 8 | ||||
-rw-r--r-- | Include/patchlevel.h | 6 | ||||
-rw-r--r-- | Include/pyport.h | 3 | ||||
-rw-r--r-- | Include/unicodeobject.h | 21 |
5 files changed, 25 insertions, 16 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index 44b5af7..e2b0750 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -404,8 +404,9 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ #define PyObject_Length PyObject_Size #ifndef Py_LIMITED_API - PyAPI_FUNC(Py_ssize_t) _PyObject_LengthHint(PyObject *o, Py_ssize_t); + PyAPI_FUNC(int) _PyObject_HasLen(PyObject *o); #endif +PyAPI_FUNC(Py_ssize_t) PyObject_LengthHint(PyObject *o, Py_ssize_t); /* Guess the size of object o using len(o) or o.__length_hint__(). diff --git a/Include/osdefs.h b/Include/osdefs.h index 90b430a..ed88da1 100644 --- a/Include/osdefs.h +++ b/Include/osdefs.h @@ -9,16 +9,10 @@ extern "C" { /* Mod by chrish: QNX has WATCOM, but isn't DOS */ #if !defined(__QNX__) -#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2) -#if defined(PYOS_OS2) && defined(PYCC_GCC) -#define MAXPATHLEN 260 -#define SEP L'/' -#define ALTSEP L'\\' -#else +#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) #define SEP L'\\' #define ALTSEP L'/' #define MAXPATHLEN 256 -#endif #define DELIM L';' #endif #endif diff --git a/Include/patchlevel.h b/Include/patchlevel.h index b5919a4..a759045 100644 --- a/Include/patchlevel.h +++ b/Include/patchlevel.h @@ -17,13 +17,13 @@ /* Version parsed out into numeric values */ /*--start constants--*/ #define PY_MAJOR_VERSION 3 -#define PY_MINOR_VERSION 3 +#define PY_MINOR_VERSION 4 #define PY_MICRO_VERSION 0 -#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL +#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA #define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "3.3.0+" +#define PY_VERSION "3.4.0a0" /*--end constants--*/ /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. diff --git a/Include/pyport.h b/Include/pyport.h index eba34f9..284e6da 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -379,9 +379,6 @@ typedef size_t Py_uhash_t; #endif #ifdef HAVE_SYS_STAT_H -#if defined(PYOS_OS2) && defined(PYCC_GCC) -#include <sys/types.h> -#endif #include <sys/stat.h> #elif defined(HAVE_STAT_H) #include <stat.h> diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index a8f5b5d..fa21c1c 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -933,12 +933,28 @@ PyAPI_FUNC(int) _PyUnicodeWriter_PrepareInternal(_PyUnicodeWriter *writer, Py_ssize_t length, Py_UCS4 maxchar); +/* Append a Unicode string. + Return 0 on success, raise an exception and return -1 on error. */ PyAPI_FUNC(int) -_PyUnicodeWriter_WriteStr(_PyUnicodeWriter *writer, PyObject *str); +_PyUnicodeWriter_WriteStr(_PyUnicodeWriter *writer, + PyObject *str /* Unicode string */ + ); +/* Append a latin1-encoded byte string. + Return 0 on success, raise an exception and return -1 on error. */ +PyAPI_FUNC(int) +_PyUnicodeWriter_WriteCstr(_PyUnicodeWriter *writer, + const char *str, /* latin1-encoded byte string */ + Py_ssize_t len /* length in bytes */ + ); + +/* Get the value of the write as an Unicode string. Clear the + buffer of the writer. Raise an exception and return NULL + on error. */ PyAPI_FUNC(PyObject *) _PyUnicodeWriter_Finish(_PyUnicodeWriter *writer); +/* Deallocate memory of a writer (clear its internal buffer). */ PyAPI_FUNC(void) _PyUnicodeWriter_Dealloc(_PyUnicodeWriter *writer); #endif @@ -1950,7 +1966,8 @@ PyAPI_FUNC(PyObject *) PyUnicode_Replace( ); /* Compare two strings and return -1, 0, 1 for less than, equal, - greater than resp. */ + greater than resp. + Raise an exception and return -1 on error. */ PyAPI_FUNC(int) PyUnicode_Compare( PyObject *left, /* Left string */ |