Changeset 391 for python/trunk/Objects/stringlib/unicodedefs.h
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Objects/stringlib/unicodedefs.h
r2 r391 12 12 #define STRINGLIB_PARSE_CODE "U" 13 13 #define STRINGLIB_EMPTY unicode_empty 14 #define STRINGLIB_ISSPACE Py_UNICODE_ISSPACE 15 #define STRINGLIB_ISLINEBREAK BLOOM_LINEBREAK 14 16 #define STRINGLIB_ISDECIMAL Py_UNICODE_ISDECIMAL 15 17 #define STRINGLIB_TODECIMAL Py_UNICODE_TODECIMAL … … 22 24 #define STRINGLIB_RESIZE PyUnicode_Resize 23 25 #define STRINGLIB_CHECK PyUnicode_Check 26 #define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact 24 27 #define STRINGLIB_GROUPING _PyUnicode_InsertThousandsGrouping 25 28 … … 32 35 #define STRINGLIB_WANT_CONTAINS_OBJ 1 33 36 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 that45 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 53 37 #endif /* !STRINGLIB_UNICODEDEFS_H */
Note:
See TracChangeset
for help on using the changeset viewer.