[Python-checkins] CVS: python/dist/src/Mac/Modules/cf CFmodule.c,1.1,1.2

Jack Jansen jackjansen@users.sourceforge.net
Wed, 27 Jun 2001 15:00:48 -0700


Update of /cvsroot/python/python/dist/src/Mac/Modules/cf
In directory usw-pr-cvs1:/tmp/cvs-serv26774/Python/Mac/Modules/cf

Modified Files:
	CFmodule.c 
Log Message:
CFArray, CFData and CFDictonary are now covered, but mainly opaque.
CFStrings are in better shape, but Unicode support and automatic conversion to/from Python strings remains to be done.

Index: CFmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cf/CFmodule.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** CFmodule.c	2001/06/26 21:51:10	1.1
--- CFmodule.c	2001/06/27 22:00:46	1.2
***************
*** 21,24 ****
--- 21,25 ----
  extern int CFStringRefObj_Convert(PyObject *, CFStringRef *);
  
+ // ADD declarations
  #ifdef NOTYET_USE_TOOLBOX_OBJECT_GLUE
  //extern PyObject *_CFTypeRefObj_New(CFTypeRef);
***************
*** 29,33 ****
--- 30,54 ----
  #endif
[...2492 lines suppressed...]
+ 	if (PyDict_SetItemString(d, "CFMutableDictionaryRefType", (PyObject *)&CFMutableDictionaryRef_Type) != 0)
+ 		Py_FatalError("can't initialize CFMutableDictionaryRefType");
+ 	CFDataRef_Type.ob_type = &PyType_Type;
+ 	Py_INCREF(&CFDataRef_Type);
+ 	if (PyDict_SetItemString(d, "CFDataRefType", (PyObject *)&CFDataRef_Type) != 0)
+ 		Py_FatalError("can't initialize CFDataRefType");
+ 	CFMutableDataRef_Type.ob_type = &PyType_Type;
+ 	Py_INCREF(&CFMutableDataRef_Type);
+ 	if (PyDict_SetItemString(d, "CFMutableDataRefType", (PyObject *)&CFMutableDataRef_Type) != 0)
+ 		Py_FatalError("can't initialize CFMutableDataRefType");
  	CFStringRef_Type.ob_type = &PyType_Type;
  	Py_INCREF(&CFStringRef_Type);
  	if (PyDict_SetItemString(d, "CFStringRefType", (PyObject *)&CFStringRef_Type) != 0)
  		Py_FatalError("can't initialize CFStringRefType");
+ 	CFMutableStringRef_Type.ob_type = &PyType_Type;
+ 	Py_INCREF(&CFMutableStringRef_Type);
+ 	if (PyDict_SetItemString(d, "CFMutableStringRefType", (PyObject *)&CFMutableStringRef_Type) != 0)
+ 		Py_FatalError("can't initialize CFMutableStringRefType");
  }