Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Objects/stringlib/unicodedefs.h

    r2 r391  
    1212#define STRINGLIB_PARSE_CODE     "U"
    1313#define STRINGLIB_EMPTY          unicode_empty
     14#define STRINGLIB_ISSPACE        Py_UNICODE_ISSPACE
     15#define STRINGLIB_ISLINEBREAK    BLOOM_LINEBREAK
    1416#define STRINGLIB_ISDECIMAL      Py_UNICODE_ISDECIMAL
    1517#define STRINGLIB_TODECIMAL      Py_UNICODE_TODECIMAL
     
    2224#define STRINGLIB_RESIZE         PyUnicode_Resize
    2325#define STRINGLIB_CHECK          PyUnicode_Check
     26#define STRINGLIB_CHECK_EXACT    PyUnicode_CheckExact
    2427#define STRINGLIB_GROUPING       _PyUnicode_InsertThousandsGrouping
    2528
     
    3235#define STRINGLIB_WANT_CONTAINS_OBJ 1
    3336
    34 /* STRINGLIB_CMP was defined as:
    35 
    36 Py_LOCAL_INLINE(int)
    37 STRINGLIB_CMP(const Py_UNICODE* str, const Py_UNICODE* other, Py_ssize_t len)
    38 {
    39     if (str[0] != other[0])
    40         return 1;
    41     return memcmp((void*) str, (void*) other, len * sizeof(Py_UNICODE));
    42 }
    43 
    44 but unfortunately that gives a error if the function isn't used in a file that
    45 includes this file.  So, reluctantly convert it to a macro instead. */
    46 
    47 #define STRINGLIB_CMP(str, other, len) \
    48     (((str)[0] != (other)[0]) ? \
    49      1 : \
    50      memcmp((void*) (str), (void*) (other), (len) * sizeof(Py_UNICODE)))
    51 
    52 
    5337#endif /* !STRINGLIB_UNICODEDEFS_H */
Note: See TracChangeset for help on using the changeset viewer.