[Python-checkins] CVS: python/dist/src/Include intobject.h,2.21,2.22 longobject.h,2.20,2.21 object.h,2.85,2.86 unicodeobject.h,2.30,2.31

Martin v. L?wis loewis@users.sourceforge.net
2001年8月17日 11:39:26 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv28889/Include
Modified Files:
	intobject.h longobject.h object.h unicodeobject.h 
Log Message:
Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
Index: intobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/intobject.h,v
retrieving revision 2.21
retrieving revision 2.22
diff -C2 -d -r2.21 -r2.22
*** intobject.h	2000年09月01日 23:29:26	2.21
--- intobject.h	2001年08月17日 18:39:24	2.22
***************
*** 31,35 ****
--- 31,37 ----
 
 extern DL_IMPORT(PyObject *) PyInt_FromString(char*, char**, int);
+ #ifdef Py_USING_UNICODE
 extern DL_IMPORT(PyObject *) PyInt_FromUnicode(Py_UNICODE*, int, int);
+ #endif
 extern DL_IMPORT(PyObject *) PyInt_FromLong(long);
 extern DL_IMPORT(long) PyInt_AsLong(PyObject *);
Index: longobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/longobject.h,v
retrieving revision 2.20
retrieving revision 2.21
diff -C2 -d -r2.20 -r2.21
*** longobject.h	2001年06月11日 21:23:58	2.20
--- longobject.h	2001年08月17日 18:39:24	2.21
***************
*** 43,47 ****
--- 43,49 ----
 
 DL_IMPORT(PyObject *) PyLong_FromString(char *, char **, int);
+ #ifdef Py_USING_UNICODE
 DL_IMPORT(PyObject *) PyLong_FromUnicode(Py_UNICODE*, int, int);
+ #endif
 
 /* _PyLong_FromByteArray: View the n unsigned bytes as a binary integer in
Index: object.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/object.h,v
retrieving revision 2.85
retrieving revision 2.86
diff -C2 -d -r2.85 -r2.86
*** object.h	2001年08月15日 18:32:33	2.85
--- object.h	2001年08月17日 18:39:24	2.86
***************
*** 321,325 ****
--- 321,327 ----
 extern DL_IMPORT(PyObject *) PyObject_Repr(PyObject *);
 extern DL_IMPORT(PyObject *) PyObject_Str(PyObject *);
+ #ifdef Py_USING_UNICODE
 extern DL_IMPORT(PyObject *) PyObject_Unicode(PyObject *);
+ #endif
 extern DL_IMPORT(int) PyObject_Compare(PyObject *, PyObject *);
 extern DL_IMPORT(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int);
Index: unicodeobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v
retrieving revision 2.30
retrieving revision 2.31
diff -C2 -d -r2.30 -r2.31
*** unicodeobject.h	2001年08月09日 22:21:55	2.30
--- unicodeobject.h	2001年08月17日 18:39:24	2.31
***************
*** 59,62 ****
--- 59,68 ----
 /* --- Internal Unicode Format -------------------------------------------- */
 
+ #ifndef Py_USING_UNICODE
+ 
+ #define PyUnicode_Check(op) 0
+ 
+ #else
+ 
 /* FIXME: MvL's new implementation assumes that Py_UNICODE_SIZE is
 properly set, but the default rules below doesn't set it. I'll
***************
*** 1088,1090 ****
--- 1094,1097 ----
 }
 #endif
+ #endif /* Py_USING_UNICODE */
 #endif /* !Py_UNICODEOBJECT_H */

AltStyle によって変換されたページ (->オリジナル) /