1. Ronald Oussoren
  2. pyobjc

Commits

Ronald Oussoren  committed 6bce65b

A number of ML related changed

1) Be explicit about the return type of methods, don't rely on the implict 'id' result

This avoids warnings with recent versions of clang.

2) Start using 'instancetype' return type for class methods that create new instances

Allows for better warnings with recent clang versions.

Also add backward compatibility define that ensures that the code still compiles
with older compilers.

3) +[OC_PythonDictionary pythonifyObject] method called the wrong [OC_PythonArray ...]
to create the wrapped object when an object was registered as a mapping through
the +[OC_PythonDictionary depythonifyTable], now calls the right OC_PythonDictionary
method instead (found through compiler warning caused by previous item)

4) Disable cacheing of IMPs in OC_PythonUnicode for now, caching causes test
failures on OSX 10.8

5) Use right filterWarnings function in test_conversion.

6) Improve port of a number of framework wrappers to OSX 10.8, still not their though.

  • Participants
  • Parent commits e046773
  • Branches default

Comments (0)

Files changed (29)

File pyobjc-core/Lib/PyObjCTools/TestSupport.py

View file
         else:
             offset = 0
         info = method.__metadata__()
-        type = info['arguments'][argno+offset]['type']
+        try:
+            type = info['arguments'][argno+offset]['type']
+        except IndexError:
+            self.fail("arg %d of %s does not exist"%(argno, method))
+
         if type != b'@?':
             self.fail(message or "arg %d of %s is not of type block: %s"%(
                 argno, method, type))

File pyobjc-core/Modules/objc/OC_PythonArray.h

View file
  *
  * Caller must own the GIL.
  */
-- initWithPythonObject:(PyObject*)value;
+- (id)initWithPythonObject:(PyObject*)value;
 
 /*!
  * @method dealloc

File pyobjc-core/Modules/objc/OC_PythonArray.m

View file
 
 @implementation OC_PythonArray 
 
-+ depythonifyObject:(PyObject*)object
++ (instancetype)depythonifyObject:(PyObject*)object
 {
 	Py_ssize_t i, len;
 	
 	return nil;
 }
 
-+ depythonifyTable
++ (id)depythonifyTable
 {
 	NSObject* result; 
 
 	return result;
 }
 
-+ arrayWithPythonObject:(PyObject*)v
++ (instancetype)arrayWithPythonObject:(PyObject*)v
 {
 	OC_PythonArray* res;
 
 	return res;
 }
 
-- initWithPythonObject:(PyObject*)v
+- (id)initWithPythonObject:(PyObject*)v
 {
 	self = [super init];
 	if (unlikely(self == nil)) return nil;
 	return result;
 }
 
--objectAtIndex:(NSUInteger)idx
+-(id)objectAtIndex:(NSUInteger)idx
 {
 	PyObject* v;
 	id result;

File pyobjc-core/Modules/objc/OC_PythonData.m

View file
 
 @implementation OC_PythonData 
 
-+ dataWithPythonObject:(PyObject*)v
++ (instancetype)dataWithPythonObject:(PyObject*)v
 {
 	OC_PythonData* res;
 
 	return res;
 }
 
-- initWithPythonObject:(PyObject*)v
+- (id)initWithPythonObject:(PyObject*)v
 {
 	self = [super init];
 	if (unlikely(self == nil)) return nil;

File pyobjc-core/Modules/objc/OC_PythonDate.h

View file
 	NSDate*   oc_value;
 }
 
-+ depythonifyObject:(PyObject*)object;
-+ dateWithPythonObject:(PyObject*)value;
-- initWithPythonObject:(PyObject*)value;
++ (instancetype)depythonifyObject:(PyObject*)object;
++ (instancetype)dateWithPythonObject:(PyObject*)value;
+- (id)initWithPythonObject:(PyObject*)value;
 -(void)dealloc;
 -(PyObject*)__pyobjc_PythonObject__;
 
 
 /* These two are only present to *disable* coding, not implement it */
 - (void)encodeWithCoder:(NSCoder*)coder;
-- initWithCoder:(NSCoder*)coder;
+- (id)initWithCoder:(NSCoder*)coder;
 
 @end

File pyobjc-core/Modules/objc/OC_PythonDate.m

View file
 
 @implementation OC_PythonDate 
 
-+ depythonifyObject:(PyObject*)object
++ (instancetype)depythonifyObject:(PyObject*)object
 {
 	if (datetime_types == NULL) {
 		/* Initialize the mapping table, don't worry about
 	return nil;
 }
 
-+ dateWithPythonObject:(PyObject*)v
++ (instancetype)dateWithPythonObject:(PyObject*)v
 {
 	OC_PythonDate* res;
 
 	return res;
 }
 
-- initWithPythonObject:(PyObject*)v
+- (id)initWithPythonObject:(PyObject*)v
 {
 	self = [super init];
 	if (unlikely(self == nil)) return nil;
 	value = v;
 }
 
-- initWithCoder:(NSCoder*)coder
+-(id)initWithCoder:(NSCoder*)coder
 {
 	value = NULL;
 

File pyobjc-core/Modules/objc/OC_PythonDictionary.m

View file
 	BOOL valid;
 	Py_ssize_t pos;
 }
-+ enumeratorWithWrappedDictionary:(OC_PythonDictionary*)value;
-- initWithWrappedDictionary:(OC_PythonDictionary*)value;
++ (instancetype)enumeratorWithWrappedDictionary:(OC_PythonDictionary*)value;
+- (id)initWithWrappedDictionary:(OC_PythonDictionary*)value;
 -(void)dealloc;
 
 -(id)nextObject;
 
 @implementation OC_PythonDictionaryEnumerator
 
-+enumeratorWithWrappedDictionary:(OC_PythonDictionary*)v
++(instancetype)enumeratorWithWrappedDictionary:(OC_PythonDictionary*)v
 {
 	return [[[self alloc] initWithWrappedDictionary:v] autorelease];
 }
 
--initWithWrappedDictionary:(OC_PythonDictionary*)v
+-(id)initWithWrappedDictionary:(OC_PythonDictionary*)v
 {
 	self = [super init];
 	if (unlikely(self == nil)) return nil;
 
 @implementation OC_PythonDictionary 
 
-+ depythonifyObject:(PyObject*)object
++ (instancetype)depythonifyObject:(PyObject*)object
 {
 	Py_ssize_t i, len;
 	
 		if (!r) continue;
 
 		/* Instance of this type should be pythonifyed as a sequence */
-		return [OC_PythonArray arrayWithPythonObject:object];
+		return [OC_PythonDictionary dictionaryWithPythonObject:object];
 	}
 
 	return NULL;
 }
 
-+ depythonifyTable
++ (id)depythonifyTable
 {
 	NSObject* result; 
 
 	return result;
 }
 
-+dictionaryWithPythonObject:(PyObject*)v
++(instancetype)dictionaryWithPythonObject:(PyObject*)v
 {
 	OC_PythonDictionary* res = 
 		[[OC_PythonDictionary alloc] initWithPythonObject:v];
 	return res;
 }
 
--initWithPythonObject:(PyObject*)v
+-(id)initWithPythonObject:(PyObject*)v
 {
 	self = [super init];
 	if (unlikely(self == nil)) return nil;
 	return 0;
 }
 
--objectForKey:key
+-(id)objectForKey:key
 {
 	PyObject* v;
 	PyObject* k;
 }
 
 
-- initWithObjects:(NSObject**)objects 
+- (id)initWithObjects:(NSObject**)objects 
 	  forKeys:(NSObject**)keys 
 	    count:(NSUInteger)count
 {
 	value = v;
 }
 
-- initWithCoder:(NSCoder*)coder
+- (id)initWithCoder:(NSCoder*)coder
 {
 	int code;
 	if ([coder allowsKeyedCoding]) {

File pyobjc-core/Modules/objc/OC_PythonEnumerator.h

View file
 	BOOL      valid;
 }
 
-+enumeratorWithPythonObject:(PyObject*)object;
--initWithPythonObject:(PyObject*)object;
++(instancetype)enumeratorWithPythonObject:(PyObject*)object;
+-(id)initWithPythonObject:(PyObject*)object;
 
 @end

File pyobjc-core/Modules/objc/OC_PythonEnumerator.m

View file
 
 @implementation OC_PythonEnumerator
 
-+enumeratorWithPythonObject:(PyObject*)object
++(instancetype)enumeratorWithPythonObject:(PyObject*)object
 {
 	return [[[self alloc] initWithPythonObject:object] autorelease];
 }
 
--initWithPythonObject:(PyObject*)object
+-(id)initWithPythonObject:(PyObject*)object
 {
 	self = [super init];
 	if (self == nil) return nil;
 	[super dealloc];
 }
 
--nextObject
+-(id)nextObject
 {
 	if (!valid) {
 		return nil;
 	return result;
 }
 
--allObjects
+-(NSArray*)allObjects
 {
 	NSMutableArray* array;
 	NSObject* cur;

File pyobjc-core/Modules/objc/OC_PythonNumber.h

View file
 	PyObject* value;
 }
 
-+ numberWithPythonObject:(PyObject*)value;
-- initWithPythonObject:(PyObject*)value;
++ (instancetype)numberWithPythonObject:(PyObject*)value;
+- (id)initWithPythonObject:(PyObject*)value;
 -(void)dealloc;
 -(PyObject*)__pyobjc_PythonObject__;
 

File pyobjc-core/Modules/objc/OC_PythonNumber.m

View file
 
 @implementation OC_PythonNumber
 
-+ numberWithPythonObject:(PyObject*)v
++ (instancetype)numberWithPythonObject:(PyObject*)v
 {
 	OC_PythonNumber* res;
 
 	return res;
 }
 
-- initWithPythonObject:(PyObject*)v
+- (id)initWithPythonObject:(PyObject*)v
 {
 	self = [super init];
 	if (unlikely(self == nil)) return nil;
 	value = v;
 }
 
-- initWithCoder:(NSCoder*)coder
+- (id)initWithCoder:(NSCoder*)coder
 {
 	if (PyObjC_Decoder != NULL) {
 		PyObjC_BEGIN_WITH_GIL

File pyobjc-core/Modules/objc/OC_PythonSet.h

View file
 	PyObject* value;
 }
 
-+ depythonifyObject:(PyObject*)object;
-+ setWithPythonObject:(PyObject*)value;
-- initWithPythonObject:(PyObject*)value;
++ (instancetype)depythonifyObject:(PyObject*)object;
++ (instancetype)setWithPythonObject:(PyObject*)value;
+- (id)initWithPythonObject:(PyObject*)value;
 -(void)dealloc;
 -(PyObject*)__pyobjc_PythonObject__;
 

File pyobjc-core/Modules/objc/OC_PythonSet.m

View file
 
 @implementation OC_PythonSet
 
-+ depythonifyObject:(PyObject*)object
++ (instancetype)depythonifyObject:(PyObject*)object
 {
 	Py_ssize_t i, len;
 	
 	return NULL;
 }
 
-+ depythonifyTable
++ (id)depythonifyTable
 {
 	NSObject* result; 
 
 	return result;
 }
 
-+ setWithPythonObject:(PyObject*)v
++ (instancetype)setWithPythonObject:(PyObject*)v
 {
 	OC_PythonSet* res;
 
 	return res;
 }
 
-- initWithPythonObject:(PyObject*)v
+- (id)initWithPythonObject:(PyObject*)v
 {
 	self = [super init];
 	if (unlikely(self == nil)) return nil;
 	value = v;
 }
 
-- initWithCoder:(NSCoder*)coder
+- (id)initWithCoder:(NSCoder*)coder
 {
 	if (PyObjC_Decoder != NULL) {
 		PyObjC_BEGIN_WITH_GIL

File pyobjc-core/Modules/objc/OC_PythonString.h

View file
  *
  * Caller must own the GIL.
  */
-+ stringWithPythonObject:(PyObject*)value;
++ (instancetype)stringWithPythonObject:(PyObject*)value;
 
 /*!
  * @method initWithPythonObject:
  *
  * Caller must own the GIL.
  */
-- initWithPythonObject:(PyObject*)value;
+- (id)initWithPythonObject:(PyObject*)value;
 
 /*!
  * @method dealloc

File pyobjc-core/Modules/objc/OC_PythonString.m

View file
 
 @implementation OC_PythonString 
 
-+ stringWithPythonObject:(PyObject*)v
++ (instancetype)stringWithPythonObject:(PyObject*)v
 {
 	OC_PythonString* res;
 
 	return res;
 }
 
-- initWithPythonObject:(PyObject*)v
+- (id)initWithPythonObject:(PyObject*)v
 {
 	Py_INCREF(v);
 	Py_XDECREF(value);
 	return self;
 }
 
--initWithBytes:(void*)bytes length:(NSUInteger)length encoding:(NSStringEncoding)encoding
+-(id)initWithBytes:(void*)bytes length:(NSUInteger)length encoding:(NSStringEncoding)encoding
 {
 	NSString* tmpval = [[NSString alloc] initWithBytes:bytes length:length encoding:encoding];
 
 	value = v;
 }
 
-- initWithCoder:(NSCoder*)coder
+- (id)initWithCoder:(NSCoder*)coder
 {
 	int v;
 	
 /* Ensure that we can be unarchived as a generic string by pure ObjC
  * code.
  */
-+classFallbacksForKeyedArchiver
++(NSArray*)classFallbacksForKeyedArchiver
 {
 	return [NSArray arrayWithObject:@"NSString"];
 }

File pyobjc-core/Modules/objc/OC_PythonUnicode.h

View file
 	PyObject* value;
 	id realObject;
 
+#ifdef PyObjC_STR_CACHE_IMP
 	/* Cache IMPs for proxied methods, for slightly better efficiency */
 	NSUInteger (*imp_length)(id, SEL);
 	unichar (*imp_charAtIndex)(id, SEL, NSUInteger);
 	void (*imp_getCharacters)(id, SEL, unichar*, NSRange);
+#endif /* PyObjC_STR_CACHE_IMP */
 }
 
 /*!

File pyobjc-core/Modules/objc/OC_PythonUnicode.m

View file
 
 @implementation OC_PythonUnicode 
 
-+ unicodeWithPythonObject:(PyObject*)v
++ (instancetype)unicodeWithPythonObject:(PyObject*)v
 {
 	OC_PythonUnicode* res;
 
 	return res;
 }
 
-- initWithPythonObject:(PyObject*)v
+- (id)initWithPythonObject:(PyObject*)v
 {
 	Py_INCREF(v);
 	Py_XDECREF(value);
 {
 	PyObjC_BEGIN_WITH_GIL
 		PyObjC_UnregisterObjCProxy(value, self);
-#ifndef PyObjC_UNICODE_FAST_PATH
 		[realObject release];
-#else
-		[realObject release];
-#endif /* !PyObjC_UNICODE_FAST_PATH */
-		Py_XDECREF(value);
+		realObject = nil;
+		Py_CLEAR(value);
+
+#ifdef PyObjC_STR_CACHE_IMP
+		imp_length = 0xDEADBEEF;
+		imp_charAtIndex = 0xDEADBEEF;
+		imp_getCharacters = 0xDEADBEEF;
+#endif /* PyObjC_STR_CACHE_IMP */
+
 	PyObjC_END_WITH_GIL
 
 	[super dealloc];
 
 -(NSUInteger)length
 {
+#ifdef PyObjC_STR_CACHE_IMP
 	if (!imp_length) {
 		[self __realObject__];
 		imp_length = (__typeof__(imp_length))([realObject methodForSelector:@selector(length)]);
 	if (!imp_length) abort();
 	if (!realObject) abort();
 	return imp_length(realObject, @selector(length));
+
+#else /* !PyObjC_STR_CACHE_IMP */
+	return [[self __realObject__] length];
+
+#endif /* !PyObjC_STR_CACHE_IMP */
 }
 
 -(unichar)characterAtIndex:(NSUInteger)anIndex
 {
+#ifdef PyObjC_STR_CACHE_IMP
 	if (!imp_charAtIndex) {
 		[self __realObject__];
 		imp_charAtIndex = (__typeof__(imp_charAtIndex))([realObject methodForSelector:@selector(characterAtIndex:)]);
 	if (!imp_charAtIndex) abort();
 	if (!realObject) abort();
 	return imp_charAtIndex(realObject, @selector(characterAtIndex:), anIndex);
+
+#else /* !PyObjC_STR_CACHE_IMP */
+	return [[self __realObject__] characterAtIndex:anIndex];
+
+#endif /* !PyObjC_STR_CACHE_IMP */
 }
 
 -(void)getCharacters:(unichar *)buffer range:(NSRange)aRange
 {
+#ifdef PyObjC_STR_CACHE_IMP
 	if (!imp_getCharacters) {
 		[self __realObject__];
 		imp_getCharacters = (__typeof__(imp_getCharacters))([realObject methodForSelector:@selector(getCharacters:range:)]);
 	if (!imp_getCharacters) abort();
 	if (!realObject) abort();
 	imp_getCharacters(realObject, @selector(getCharacters:range:), buffer, aRange);
+
+#else	/* !PyObjC_STR_CACHE_IMP */
+	return [[self __realObject__] getCharacters:buffer range:aRange];
+
+#endif
+}
+
+-(void)getCharacters:(unichar*)buffer
+{
+	return [[self __realObject__] getCharacters:buffer];
 }
 
 /*
 	return self;
 }
 
--initWithBytes:(void*)bytes length:(NSUInteger)length encoding:(NSStringEncoding)encoding
+-(id)initWithBytes:(void*)bytes length:(NSUInteger)length encoding:(NSStringEncoding)encoding
 {
 	char* py_encoding = NULL;
 	int byteorder = 0;
 	value = v;
 }
 
-- initWithCoder:(NSCoder*)coder
+-(id)initWithCoder:(NSCoder*)coder
 {
 	int ver;
 	if ([coder allowsKeyedCoding]) {
 /* Ensure that we can be unarchived as a generic string by pure ObjC
  * code.
  */
-+classFallbacksForKeyedArchiver
++(NSArray*)classFallbacksForKeyedArchiver
 {
 	return [NSArray arrayWithObject:@"NSString"];
 }

File pyobjc-core/Modules/objc/module.m

View file
 	if (PyModule_AddIntConstant(m, "MAC_OS_X_VERSION_10_7", MAC_OS_X_VERSION_10_7) < 0) {
 		PyObjC_INITERROR();
 	}
-#endif /* MAC_OS_X_VERSION_10_6 */
+#endif /* MAC_OS_X_VERSION_10_7 */
+
+#ifdef MAC_OS_X_VERSION_10_8
+	if (PyModule_AddIntConstant(m, "MAC_OS_X_VERSION_10_8", MAC_OS_X_VERSION_10_8) < 0) {
+		PyObjC_INITERROR();
+	}
+#endif /* MAC_OS_X_VERSION_10_8 */
 
 	if (PyModule_AddStringConstant(m, "platform", "MACOSX") < 0) {
 		PyObjC_INITERROR();

File pyobjc-core/Modules/objc/objc-runtime-compat.m

View file
 #if defined(__x86_64__)
 
 @implementation Protocol (NSOBjectCompat)
-- self
+- (id)self
 {
 	return self;
 }
 
 #if PyObjC_BUILD_RELEASE < 1008
 @implementation Object (NSOBjectCompat)
-- self
+- (id)self
 {
 	return self;
 }

File pyobjc-core/Modules/objc/pyobjc-compat.h

View file
 #define MAC_OS_X_VERSION_10_7 1070
 #endif
 
+#ifndef MAC_OS_X_VERSION_10_8
+#define MAC_OS_X_VERSION_10_8 1080
+#endif
+
 
 /* On some versions of GCC <limits.h> defines LONG_LONG_MAX but not LLONG_MAX,
  * compensate.
 extern PyObject* PyObjC_IntFromString(char* v, char**pend, int base);
 extern PyObject* PyObjC_IntFromLong(long v);
 
+
+#ifndef __has_feature
+#  define __has_feature(x) 0
+#endif
+
+#if !__has_feature(objc_instancetype)
+#  define instancetype id
+#endif
+
 #endif /* PyObjC_COMPAT_H */

File pyobjc-core/Modules/objc/pyobjc.h

View file
  * must create the things and this is the only way to do it...
  */
 @interface NSMethodSignature (WarningKiller)
-	+signatureWithObjCTypes:(const char*)types;
+	+(instancetype)signatureWithObjCTypes:(const char*)types;
 @end /* interface NSMethodSignature */
 
 

File pyobjc-core/Modules/objc/selector.m

View file
 
 		object = PyObjCObject_GetObject(self);
 
-		if (nil != (methsig = [object methodSignatureForSelector:sel])){
-			PyObjCNativeSelector* res;
+		NS_DURING
+			if (nil != (methsig = [object methodSignatureForSelector:sel])){
+				PyObjCNativeSelector* res;
 
-			res =  (PyObjCNativeSelector*)PyObjCSelector_NewNative(
-				object_getClass(object), sel, 
-				PyObjC_NSMethodSignatureToTypeString(methsig, 
-					buf, sizeof(buf)), 0);
-			if (res != NULL) {
-				/* Bind the method to self */
-				res->sel_self = self;
-				Py_INCREF(res->sel_self);
+				res =  (PyObjCNativeSelector*)PyObjCSelector_NewNative(
+					object_getClass(object), sel, 
+					PyObjC_NSMethodSignatureToTypeString(methsig, 
+						buf, sizeof(buf)), 0);
+				if (res != NULL) {
+					/* Bind the method to self */
+					res->sel_self = self;
+					Py_INCREF(res->sel_self);
+				}
+				retval = (PyObject*)res;
+			} else {
+				PyErr_Format(PyExc_AttributeError,
+					"No attribute %s", name);
+				retval = NULL;
 			}
-			return (PyObject*)res;
-		} else {
+
+		NS_HANDLER
 			PyErr_Format(PyExc_AttributeError,
 				"No attribute %s", name);
-			return NULL;
-		}
+			retval = NULL;
+
+		NS_ENDHANDLER
+
+		return retval;
 	} else {
 		PyErr_SetString(PyExc_RuntimeError,
 			"PyObjCSelector_FindNative called on plain "

File pyobjc-core/PyObjCTest/test_conversion.py

View file
 from .testbndl import FLT_MAX, FLT_MIN, FLT_EPSILON
 import objc
 import array, sys
-from warnings import filterwarnings
 
 
 
             self.assertEqual(ULLONG_MAX, pyObjCPy(objc._C_ULNG_LNG, long(ULLONG_MAX)))
         self.assertEqual(0, pyObjCPy(objc._C_ULNG_LNG, float(0)))
 
-        with filterwarnings('error', DeprecationWarning):
+        with filterWarnings('error', DeprecationWarning):
             try:
                 pyObjCPy(objc._C_ULNG_LNG, LLONG_MIN+100)
             except DeprecationWarning:
             else:
                 self.fail("No deprecation warning")
 
-        with filterwarnings('ignore', DeprecationWarning):
+        with filterWarnings('ignore', DeprecationWarning):
             self.assertEqual(-LLONG_MIN+100, pyObjCPy(objc._C_ULNG_LNG, LLONG_MIN+100))
 
         #self.assertRaises(ValueError, pyObjCPy, objc._C_ULNG_LNG, LLONG_MIN)

File pyobjc-framework-Cocoa/PyObjCTest/test_cfstring.py

View file
         CFStringReplaceAll(s, b"aHelloaaa".decode('ascii'))
         trim_chars = b'a'.decode('ascii')
 
-        # XXX: CoreFoundation API regularly fails when second argument is a non-Apple NSString
-        #trim_chars = CFStringCreateWithCString(None, b"a", kCFStringEncodingASCII)
-        print >>sys.stderr, ("@@@@@@@ BEFORE TRIM @@@@@@")
+        #print s
         CFStringTrim(s, trim_chars)
-        print >>sys.stderr, ("@@@@@@@ AFTER TRIM @@@@@@")
+        #print s
         self.assertEqual(s, b"Hello".decode('ascii'))
 
-        # XXX: CoreFoundation API regularly fails when second argument is a non-Apple NSString
         CFStringReplaceAll(s, b"* * * *abc * ".decode('ascii'))
         trim_chars = b'* '.decode('ascii')
-
         
         trim_chars = CFStringCreateWithCString(None, b"* ", kCFStringEncodingASCII)
         CFStringTrim(s, trim_chars)

File pyobjc-framework-Cocoa/metadata/CoreFoundation.fwinfo

View file
   "classes": {}, 
   "formal_protocols": {}, 
   "functions": {
+   "_CFAutoreleasePoolPrintPools": {
+     "args": {},
+     "retval": {
+        "typestr": "v"
+     }
+   },
    "CFPlugInGetTypeID": {
      "ignore": true
    },

File pyobjc-framework-DictionaryServices/PyObjCTest/test_dictionaryservices.py

View file
         self.assertIsInstance(r, CFRange)
         self.assertEqual(r, (4, 5))
 
-        r = DCSCopyTextDefinition(None, b"the hello world program".decode('latin1'), r)
+        r = DCSCopyTextDefinition(None, b"program".decode('latin1'), r)
         self.assertIsInstance(r, unicode)
 
         v = DCSDictionaryGetTypeID()

File pyobjc-framework-OpenDirectory/Lib/OpenDirectory/_metadata.py

View file
 # This file is generated by objective.metadata
 #
-# Last update: Fri May 25 17:46:58 2012
+# Last update: Wed Jun 27 17:59:40 2012
 
 import objc, sys
 
 
 misc = {
 }
-constants = '''$ODFrameworkErrorDomain$ODSessionProxyAddress$ODSessionProxyPassword$ODSessionProxyPort$ODSessionProxyUsername$kODAttributeTypeAccessControlEntry$kODAttributeTypeAddressLine1$kODAttributeTypeAddressLine2$kODAttributeTypeAddressLine3$kODAttributeTypeAdminLimits$kODAttributeTypeAdvertisedServices$kODAttributeTypeAlias$kODAttributeTypeAllAttributes$kODAttributeTypeAllTypes$kODAttributeTypeAltSecurityIdentities$kODAttributeTypeAreaCode$kODAttributeTypeAttrListRefCount$kODAttributeTypeAttrListRefs$kODAttributeTypeAttrListValueRefCount$kODAttributeTypeAttrListValueRefs$kODAttributeTypeAuthCredential$kODAttributeTypeAuthMethod$kODAttributeTypeAuthenticationAuthority$kODAttributeTypeAuthenticationHint$kODAttributeTypeAuthorityRevocationList$kODAttributeTypeAutomaticSearchPath$kODAttributeTypeAutomountInformation$kODAttributeTypeBirthday$kODAttributeTypeBootParams$kODAttributeTypeBuildVersion$kODAttributeTypeBuilding$kODAttributeTypeCACertificate$kODAttributeTypeCapacity$kODAttributeTypeCertificateRevocationList$kODAttributeTypeCity$kODAttributeTypeComment$kODAttributeTypeCompany$kODAttributeTypeComputers$kODAttributeTypeConfigAvailable$kODAttributeTypeConfigFile$kODAttributeTypeContactGUID$kODAttributeTypeContactPerson$kODAttributeTypeCopyTimestamp$kODAttributeTypeCoreFWVersion$kODAttributeTypeCountry$kODAttributeTypeCreationTimestamp$kODAttributeTypeCrossCertificatePair$kODAttributeTypeCustomSearchPath$kODAttributeTypeDNSDomain$kODAttributeTypeDNSName$kODAttributeTypeDNSNameServer$kODAttributeTypeDataStamp$kODAttributeTypeDateRecordCreated$kODAttributeTypeDepartment$kODAttributeTypeDirRefCount$kODAttributeTypeDirRefs$kODAttributeTypeEMailAddress$kODAttributeTypeEMailContacts$kODAttributeTypeENetAddress$kODAttributeTypeExpire$kODAttributeTypeFWVersion$kODAttributeTypeFaxNumber$kODAttributeTypeFirstName$kODAttributeTypeFullName$kODAttributeTypeFunctionalState$kODAttributeTypeGUID$kODAttributeTypeGroup$kODAttributeTypeGroupMembers$kODAttributeTypeGroupMembership$kODAttributeTypeGroupServices$kODAttributeTypeHTML$kODAttributeTypeHardwareUUID$kODAttributeTypeHomeDirectory$kODAttributeTypeHomeDirectoryQuota$kODAttributeTypeHomeDirectorySoftQuota$kODAttributeTypeHomeLocOwner$kODAttributeTypeHomePhoneNumber$kODAttributeTypeIMHandle$kODAttributeTypeIPAddress$kODAttributeTypeIPAddressAndENetAddress$kODAttributeTypeIPv6Address$kODAttributeTypeInternetAlias$kODAttributeTypeJPEGPhoto$kODAttributeTypeJobTitle$kODAttributeTypeKDCAuthKey$kODAttributeTypeKDCConfigData$kODAttributeTypeKerberosRealm$kODAttributeTypeKerberosServices$kODAttributeTypeKeywords$kODAttributeTypeLDAPReadReplicas$kODAttributeTypeLDAPSearchBaseSuffix$kODAttributeTypeLDAPWriteReplicas$kODAttributeTypeLastName$kODAttributeTypeLocalOnlySearchPath$kODAttributeTypeLocaleRelay$kODAttributeTypeLocaleSubnets$kODAttributeTypeLocation$kODAttributeTypeMCXFlags$kODAttributeTypeMCXSettings$kODAttributeTypeMIME$kODAttributeTypeMailAttribute$kODAttributeTypeMapCoordinates$kODAttributeTypeMapGUID$kODAttributeTypeMapURI$kODAttributeTypeMetaAmbiguousName$kODAttributeTypeMetaAugmentedAttributes$kODAttributeTypeMetaAutomountMap$kODAttributeTypeMetaNodeLocation$kODAttributeTypeMetaRecordName$kODAttributeTypeMiddleName$kODAttributeTypeMobileNumber$kODAttributeTypeModificationTimestamp$kODAttributeTypeNFSHomeDirectory$kODAttributeTypeNTDomainComputerAccount$kODAttributeTypeNamePrefix$kODAttributeTypeNameSuffix$kODAttributeTypeNativeOnly$kODAttributeTypeNestedGroups$kODAttributeTypeNetGroupTriplet$kODAttributeTypeNetGroups$kODAttributeTypeNetworkInterfaces$kODAttributeTypeNetworkNumber$kODAttributeTypeNickName$kODAttributeTypeNodePath$kODAttributeTypeNodeRefCount$kODAttributeTypeNodeRefs$kODAttributeTypeNote$kODAttributeTypeNumTableList$kODAttributeTypeOperatingSystem$kODAttributeTypeOperatingSystemVersion$kODAttributeTypeOrganizationInfo$kODAttributeTypeOrganizationName$kODAttributeTypeOriginalHomeDirectory$kODAttributeTypeOriginalNFSHomeDirectory$kODAttributeTypeOriginalNodeName$kODAttributeTypeOwner$kODAttributeTypeOwnerGUID$kODAttributeTypePGPPublicKey$kODAttributeTypePIDValue$kODAttributeTypePagerNumber$kODAttributeTypeParentLocales$kODAttributeTypePassword$kODAttributeTypePasswordPlus$kODAttributeTypePasswordPolicyOptions$kODAttributeTypePasswordServerList$kODAttributeTypePasswordServerLocation$kODAttributeTypePhoneContacts$kODAttributeTypePhoneNumber$kODAttributeTypePicture$kODAttributeTypePlugInInfo$kODAttributeTypePluginIndex$kODAttributeTypePort$kODAttributeTypePostalAddress$kODAttributeTypePostalAddressContacts$kODAttributeTypePostalCode$kODAttributeTypePresetUserIsAdmin$kODAttributeTypePrimaryComputerGUID$kODAttributeTypePrimaryComputerList$kODAttributeTypePrimaryGroupID$kODAttributeTypePrimaryLocale$kODAttributeTypePrimaryNTDomain$kODAttributeTypePrintServiceInfoText$kODAttributeTypePrintServiceInfoXML$kODAttributeTypePrintServiceUserData$kODAttributeTypePrinter1284DeviceID$kODAttributeTypePrinterLPRHost$kODAttributeTypePrinterLPRQueue$kODAttributeTypePrinterMakeAndModel$kODAttributeTypePrinterType$kODAttributeTypePrinterURI$kODAttributeTypePrinterXRISupported$kODAttributeTypeProcessName$kODAttributeTypeProtocolNumber$kODAttributeTypeProtocols$kODAttributeTypePwdAgingPolicy$kODAttributeTypeRPCNumber$kODAttributeTypeReadOnlyNode$kODAttributeTypeRealUserID$kODAttributeTypeRecRefCount$kODAttributeTypeRecRefs$kODAttributeTypeRecordName$kODAttributeTypeRecordType$kODAttributeTypeRelationships$kODAttributeTypeRelativeDNPrefix$kODAttributeTypeResourceInfo$kODAttributeTypeResourceType$kODAttributeTypeSMBAcctFlags$kODAttributeTypeSMBGroupRID$kODAttributeTypeSMBHome$kODAttributeTypeSMBHomeDrive$kODAttributeTypeSMBKickoffTime$kODAttributeTypeSMBLogoffTime$kODAttributeTypeSMBLogonTime$kODAttributeTypeSMBPWDLastSet$kODAttributeTypeSMBPrimaryGroupSID$kODAttributeTypeSMBProfilePath$kODAttributeTypeSMBRID$kODAttributeTypeSMBSID$kODAttributeTypeSMBScriptPath$kODAttributeTypeSMBUserWorkstations$kODAttributeTypeSchema$kODAttributeTypeSearchPath$kODAttributeTypeSearchPolicy$kODAttributeTypeServiceType$kODAttributeTypeServicesLocator$kODAttributeTypeSetupAdvertising$kODAttributeTypeSetupAutoRegister$kODAttributeTypeSetupLocation$kODAttributeTypeSetupOccupation$kODAttributeTypeStandardOnly$kODAttributeTypeState$kODAttributeTypeStreet$kODAttributeTypeSubNodes$kODAttributeTypeTimePackage$kODAttributeTypeTimeToLive$kODAttributeTypeTotalRefCount$kODAttributeTypeTotalSize$kODAttributeTypeTrustInformation$kODAttributeTypeURL$kODAttributeTypeUniqueID$kODAttributeTypeUserCertificate$kODAttributeTypeUserPKCS12Data$kODAttributeTypeUserSMIMECertificate$kODAttributeTypeUserShell$kODAttributeTypeVFSDumpFreq$kODAttributeTypeVFSLinkDir$kODAttributeTypeVFSOpts$kODAttributeTypeVFSPassNo$kODAttributeTypeVFSType$kODAttributeTypeVersion$kODAttributeTypeWeblogURI$kODAttributeTypeXMLPlist$kODAuthenticationType2WayRandom$kODAuthenticationType2WayRandomChangePasswd$kODAuthenticationTypeAPOP$kODAuthenticationTypeCRAM_MD5$kODAuthenticationTypeChangePasswd$kODAuthenticationTypeClearText$kODAuthenticationTypeCrypt$kODAuthenticationTypeDIGEST_MD5$kODAuthenticationTypeDeleteUser$kODAuthenticationTypeGetEffectivePolicy$kODAuthenticationTypeGetGlobalPolicy$kODAuthenticationTypeGetKerberosPrincipal$kODAuthenticationTypeGetPolicy$kODAuthenticationTypeGetUserData$kODAuthenticationTypeGetUserName$kODAuthenticationTypeKerberosTickets$kODAuthenticationTypeMPPEMasterKeys$kODAuthenticationTypeMSCHAP2$kODAuthenticationTypeNTLMv2$kODAuthenticationTypeNTLMv2WithSessionKey$kODAuthenticationTypeNewUser$kODAuthenticationTypeNewUserWithPolicy$kODAuthenticationTypeNodeNativeClearTextOK$kODAuthenticationTypeNodeNativeNoClearText$kODAuthenticationTypeReadSecureHash$kODAuthenticationTypeSMBNTv2UserSessionKey$kODAuthenticationTypeSMBWorkstationCredentialSessionKey$kODAuthenticationTypeSMB_LM_Key$kODAuthenticationTypeSMB_NT_Key$kODAuthenticationTypeSMB_NT_UserSessionKey$kODAuthenticationTypeSMB_NT_WithUserSessionKey$kODAuthenticationTypeSecureHash$kODAuthenticationTypeSetCertificateHashAsCurrent$kODAuthenticationTypeSetGlobalPolicy$kODAuthenticationTypeSetLMHash$kODAuthenticationTypeSetNTHash$kODAuthenticationTypeSetPassword$kODAuthenticationTypeSetPasswordAsCurrent$kODAuthenticationTypeSetPolicy$kODAuthenticationTypeSetPolicyAsCurrent$kODAuthenticationTypeSetUserData$kODAuthenticationTypeSetUserName$kODAuthenticationTypeSetWorkstationPassword$kODAuthenticationTypeWithAuthorizationRef$kODAuthenticationTypeWriteSecureHash$kODErrorDomainFramework@^{__CFString=}$kODRecordTypeAFPServer$kODRecordTypeAliases$kODRecordTypeAttributeTypes$kODRecordTypeAugments$kODRecordTypeAutoServerSetup$kODRecordTypeAutomount$kODRecordTypeAutomountMap$kODRecordTypeBootp$kODRecordTypeCertificateAuthorities$kODRecordTypeComputerGroups$kODRecordTypeComputerLists$kODRecordTypeComputers$kODRecordTypeConfiguration$kODRecordTypeEthernets$kODRecordTypeFTPServer$kODRecordTypeFileMakerServers$kODRecordTypeGroups$kODRecordTypeHostServices$kODRecordTypeHosts$kODRecordTypeLDAPServer$kODRecordTypeLocations$kODRecordTypeMounts$kODRecordTypeNFS$kODRecordTypeNetDomains$kODRecordTypeNetGroups$kODRecordTypeNetworks$kODRecordTypePeople$kODRecordTypePresetComputerGroups$kODRecordTypePresetComputerLists$kODRecordTypePresetComputers$kODRecordTypePresetGroups$kODRecordTypePresetUsers$kODRecordTypePrintService$kODRecordTypePrintServiceUser$kODRecordTypePrinters$kODRecordTypeProtocols$kODRecordTypeQTSServer$kODRecordTypeRPC$kODRecordTypeRecordTypes$kODRecordTypeResources$kODRecordTypeSMBServer$kODRecordTypeServer$kODRecordTypeServices$kODRecordTypeSharePoints$kODRecordTypeUsers$kODRecordTypeWebServer$kODSessionDefault@^{__ODSession=}$kODSessionProxyAddress@^{__CFString=}$kODSessionProxyPassword@^{__CFString=}$kODSessionProxyPort@^{__CFString=}$kODSessionProxyUsername@^{__CFString=}$'''
+constants = '''$ODFrameworkErrorDomain$ODSessionProxyAddress$ODSessionProxyPassword$ODSessionProxyPort$ODSessionProxyUsername$kODAttributeTypeAccessControlEntry$kODAttributeTypeAddressLine1$kODAttributeTypeAddressLine2$kODAttributeTypeAddressLine3$kODAttributeTypeAdminLimits$kODAttributeTypeAdvertisedServices$kODAttributeTypeAlias$kODAttributeTypeAllAttributes$kODAttributeTypeAllTypes$kODAttributeTypeAltSecurityIdentities$kODAttributeTypeAreaCode$kODAttributeTypeAttrListRefCount$kODAttributeTypeAttrListRefs$kODAttributeTypeAttrListValueRefCount$kODAttributeTypeAttrListValueRefs$kODAttributeTypeAuthCredential$kODAttributeTypeAuthMethod$kODAttributeTypeAuthenticationAuthority$kODAttributeTypeAuthenticationHint$kODAttributeTypeAuthorityRevocationList$kODAttributeTypeAutomaticSearchPath$kODAttributeTypeAutomountInformation$kODAttributeTypeBirthday$kODAttributeTypeBootParams$kODAttributeTypeBuildVersion$kODAttributeTypeBuilding$kODAttributeTypeCACertificate$kODAttributeTypeCapacity$kODAttributeTypeCertificateRevocationList$kODAttributeTypeCity$kODAttributeTypeComment$kODAttributeTypeCompany$kODAttributeTypeComputers$kODAttributeTypeConfigAvailable$kODAttributeTypeConfigFile$kODAttributeTypeContactGUID$kODAttributeTypeContactPerson$kODAttributeTypeCopyTimestamp$kODAttributeTypeCoreFWVersion$kODAttributeTypeCountry$kODAttributeTypeCreationTimestamp$kODAttributeTypeCrossCertificatePair$kODAttributeTypeCustomSearchPath$kODAttributeTypeDNSDomain$kODAttributeTypeDNSName$kODAttributeTypeDNSNameServer$kODAttributeTypeDataStamp$kODAttributeTypeDateRecordCreated$kODAttributeTypeDepartment$kODAttributeTypeDirRefCount$kODAttributeTypeDirRefs$kODAttributeTypeEMailAddress$kODAttributeTypeEMailContacts$kODAttributeTypeENetAddress$kODAttributeTypeExpire$kODAttributeTypeFWVersion$kODAttributeTypeFaxNumber$kODAttributeTypeFirstName$kODAttributeTypeFullName$kODAttributeTypeFunctionalState$kODAttributeTypeGUID$kODAttributeTypeGroup$kODAttributeTypeGroupMembers$kODAttributeTypeGroupMembership$kODAttributeTypeGroupServices$kODAttributeTypeHTML$kODAttributeTypeHardwareUUID$kODAttributeTypeHomeDirectory$kODAttributeTypeHomeDirectoryQuota$kODAttributeTypeHomeDirectorySoftQuota$kODAttributeTypeHomeLocOwner$kODAttributeTypeHomePhoneNumber$kODAttributeTypeIMHandle$kODAttributeTypeIPAddress$kODAttributeTypeIPAddressAndENetAddress$kODAttributeTypeIPv6Address$kODAttributeTypeInternetAlias$kODAttributeTypeJPEGPhoto$kODAttributeTypeJobTitle$kODAttributeTypeKDCAuthKey$kODAttributeTypeKDCConfigData$kODAttributeTypeKerberosRealm$kODAttributeTypeKerberosServices$kODAttributeTypeKeywords$kODAttributeTypeLDAPReadReplicas$kODAttributeTypeLDAPSearchBaseSuffix$kODAttributeTypeLDAPWriteReplicas$kODAttributeTypeLastName$kODAttributeTypeLocalOnlySearchPath$kODAttributeTypeLocaleRelay$kODAttributeTypeLocaleSubnets$kODAttributeTypeLocation$kODAttributeTypeMCXFlags$kODAttributeTypeMCXSettings$kODAttributeTypeMIME$kODAttributeTypeMailAttribute$kODAttributeTypeMapCoordinates$kODAttributeTypeMapGUID$kODAttributeTypeMapURI$kODAttributeTypeMetaAmbiguousName$kODAttributeTypeMetaAugmentedAttributes$kODAttributeTypeMetaAutomountMap$kODAttributeTypeMetaNodeLocation$kODAttributeTypeMetaRecordName$kODAttributeTypeMiddleName$kODAttributeTypeMobileNumber$kODAttributeTypeModificationTimestamp$kODAttributeTypeNFSHomeDirectory$kODAttributeTypeNTDomainComputerAccount$kODAttributeTypeNamePrefix$kODAttributeTypeNameSuffix$kODAttributeTypeNativeOnly$kODAttributeTypeNestedGroups$kODAttributeTypeNetGroupTriplet$kODAttributeTypeNetGroups$kODAttributeTypeNetworkInterfaces$kODAttributeTypeNetworkNumber$kODAttributeTypeNickName$kODAttributeTypeNodeOptions$kODAttributeTypeNodePath$kODAttributeTypeNodeRefCount$kODAttributeTypeNodeRefs$kODAttributeTypeNote$kODAttributeTypeNumTableList$kODAttributeTypeOperatingSystem$kODAttributeTypeOperatingSystemVersion$kODAttributeTypeOrganizationInfo$kODAttributeTypeOrganizationName$kODAttributeTypeOriginalHomeDirectory$kODAttributeTypeOriginalNFSHomeDirectory$kODAttributeTypeOriginalNodeName$kODAttributeTypeOwner$kODAttributeTypeOwnerGUID$kODAttributeTypePGPPublicKey$kODAttributeTypePIDValue$kODAttributeTypePagerNumber$kODAttributeTypeParentLocales$kODAttributeTypePassword$kODAttributeTypePasswordPlus$kODAttributeTypePasswordPolicyOptions$kODAttributeTypePasswordServerList$kODAttributeTypePasswordServerLocation$kODAttributeTypePhoneContacts$kODAttributeTypePhoneNumber$kODAttributeTypePicture$kODAttributeTypePlugInInfo$kODAttributeTypePluginIndex$kODAttributeTypePort$kODAttributeTypePostalAddress$kODAttributeTypePostalAddressContacts$kODAttributeTypePostalCode$kODAttributeTypePresetUserIsAdmin$kODAttributeTypePrimaryComputerGUID$kODAttributeTypePrimaryComputerList$kODAttributeTypePrimaryGroupID$kODAttributeTypePrimaryLocale$kODAttributeTypePrimaryNTDomain$kODAttributeTypePrintServiceInfoText$kODAttributeTypePrintServiceInfoXML$kODAttributeTypePrintServiceUserData$kODAttributeTypePrinter1284DeviceID$kODAttributeTypePrinterLPRHost$kODAttributeTypePrinterLPRQueue$kODAttributeTypePrinterMakeAndModel$kODAttributeTypePrinterType$kODAttributeTypePrinterURI$kODAttributeTypePrinterXRISupported$kODAttributeTypeProcessName$kODAttributeTypeProtocolNumber$kODAttributeTypeProtocols$kODAttributeTypePwdAgingPolicy$kODAttributeTypeRPCNumber$kODAttributeTypeReadOnlyNode$kODAttributeTypeRealUserID$kODAttributeTypeRecRefCount$kODAttributeTypeRecRefs$kODAttributeTypeRecordName$kODAttributeTypeRecordType$kODAttributeTypeRelationships$kODAttributeTypeRelativeDNPrefix$kODAttributeTypeResourceInfo$kODAttributeTypeResourceType$kODAttributeTypeSMBAcctFlags$kODAttributeTypeSMBGroupRID$kODAttributeTypeSMBHome$kODAttributeTypeSMBHomeDrive$kODAttributeTypeSMBKickoffTime$kODAttributeTypeSMBLogoffTime$kODAttributeTypeSMBLogonTime$kODAttributeTypeSMBPWDLastSet$kODAttributeTypeSMBPrimaryGroupSID$kODAttributeTypeSMBProfilePath$kODAttributeTypeSMBRID$kODAttributeTypeSMBSID$kODAttributeTypeSMBScriptPath$kODAttributeTypeSMBUserWorkstations$kODAttributeTypeSchema$kODAttributeTypeSearchPath$kODAttributeTypeSearchPolicy$kODAttributeTypeServiceType$kODAttributeTypeServicesLocator$kODAttributeTypeSetupAdvertising$kODAttributeTypeSetupAutoRegister$kODAttributeTypeSetupLocation$kODAttributeTypeSetupOccupation$kODAttributeTypeStandardOnly$kODAttributeTypeState$kODAttributeTypeStreet$kODAttributeTypeSubNodes$kODAttributeTypeTimePackage$kODAttributeTypeTimeToLive$kODAttributeTypeTotalRefCount$kODAttributeTypeTotalSize$kODAttributeTypeTrustInformation$kODAttributeTypeURL$kODAttributeTypeUniqueID$kODAttributeTypeUserCertificate$kODAttributeTypeUserPKCS12Data$kODAttributeTypeUserSMIMECertificate$kODAttributeTypeUserShell$kODAttributeTypeVFSDumpFreq$kODAttributeTypeVFSLinkDir$kODAttributeTypeVFSOpts$kODAttributeTypeVFSPassNo$kODAttributeTypeVFSType$kODAttributeTypeVersion$kODAttributeTypeWeblogURI$kODAttributeTypeXMLPlist$kODAuthenticationType2WayRandom$kODAuthenticationType2WayRandomChangePasswd$kODAuthenticationTypeAPOP$kODAuthenticationTypeCRAM_MD5$kODAuthenticationTypeChangePasswd$kODAuthenticationTypeClearText$kODAuthenticationTypeCrypt$kODAuthenticationTypeDIGEST_MD5$kODAuthenticationTypeDeleteUser$kODAuthenticationTypeGetEffectivePolicy$kODAuthenticationTypeGetGlobalPolicy$kODAuthenticationTypeGetKerberosPrincipal$kODAuthenticationTypeGetPolicy$kODAuthenticationTypeGetUserData$kODAuthenticationTypeGetUserName$kODAuthenticationTypeKerberosTickets$kODAuthenticationTypeMPPEMasterKeys$kODAuthenticationTypeMSCHAP2$kODAuthenticationTypeNTLMv2$kODAuthenticationTypeNTLMv2WithSessionKey$kODAuthenticationTypeNewUser$kODAuthenticationTypeNewUserWithPolicy$kODAuthenticationTypeNodeNativeClearTextOK$kODAuthenticationTypeNodeNativeNoClearText$kODAuthenticationTypeReadSecureHash$kODAuthenticationTypeSMBNTv2UserSessionKey$kODAuthenticationTypeSMBWorkstationCredentialSessionKey$kODAuthenticationTypeSMB_LM_Key$kODAuthenticationTypeSMB_NT_Key$kODAuthenticationTypeSMB_NT_UserSessionKey$kODAuthenticationTypeSMB_NT_WithUserSessionKey$kODAuthenticationTypeSecureHash$kODAuthenticationTypeSetCertificateHashAsCurrent$kODAuthenticationTypeSetGlobalPolicy$kODAuthenticationTypeSetLMHash$kODAuthenticationTypeSetNTHash$kODAuthenticationTypeSetPassword$kODAuthenticationTypeSetPasswordAsCurrent$kODAuthenticationTypeSetPolicy$kODAuthenticationTypeSetPolicyAsCurrent$kODAuthenticationTypeSetUserData$kODAuthenticationTypeSetUserName$kODAuthenticationTypeSetWorkstationPassword$kODAuthenticationTypeWithAuthorizationRef$kODAuthenticationTypeWriteSecureHash$kODErrorDomainFramework@^{__CFString=}$kODNodeOptionsQuerySkippedSubnode@^{__CFString=}$kODRecordTypeAFPServer$kODRecordTypeAliases$kODRecordTypeAttributeTypes$kODRecordTypeAugments$kODRecordTypeAutoServerSetup$kODRecordTypeAutomount$kODRecordTypeAutomountMap$kODRecordTypeBootp$kODRecordTypeCertificateAuthorities$kODRecordTypeComputerGroups$kODRecordTypeComputerLists$kODRecordTypeComputers$kODRecordTypeConfiguration$kODRecordTypeEthernets$kODRecordTypeFTPServer$kODRecordTypeFileMakerServers$kODRecordTypeGroups$kODRecordTypeHostServices$kODRecordTypeHosts$kODRecordTypeLDAPServer$kODRecordTypeLocations$kODRecordTypeMounts$kODRecordTypeNFS$kODRecordTypeNetDomains$kODRecordTypeNetGroups$kODRecordTypeNetworks$kODRecordTypePeople$kODRecordTypePresetComputerGroups$kODRecordTypePresetComputerLists$kODRecordTypePresetComputers$kODRecordTypePresetGroups$kODRecordTypePresetUsers$kODRecordTypePrintService$kODRecordTypePrintServiceUser$kODRecordTypePrinters$kODRecordTypeProtocols$kODRecordTypeQTSServer$kODRecordTypeQueryInformation$kODRecordTypeRPC$kODRecordTypeRecordTypes$kODRecordTypeResources$kODRecordTypeSMBServer$kODRecordTypeServer$kODRecordTypeServices$kODRecordTypeSharePoints$kODRecordTypeUsers$kODRecordTypeWebServer$kODSessionDefault@^{__ODSession=}$kODSessionProxyAddress@^{__CFString=}$kODSessionProxyPassword@^{__CFString=}$kODSessionProxyPort@^{__CFString=}$kODSessionProxyUsername@^{__CFString=}$'''
 enums = '''$kODErrorCredentialsAccountDisabled@5301$kODErrorCredentialsAccountExpired@5302$kODErrorCredentialsAccountInactive@5303$kODErrorCredentialsAccountNotFound@5300$kODErrorCredentialsContactMaster@5204$kODErrorCredentialsInvalid@5000$kODErrorCredentialsInvalidComputer@5501$kODErrorCredentialsInvalidLogonHours@5500$kODErrorCredentialsMethodNotSupported@5100$kODErrorCredentialsNotAuthorized@5101$kODErrorCredentialsOperationFailed@5103$kODErrorCredentialsParameterError@5102$kODErrorCredentialsPasswordChangeRequired@5401$kODErrorCredentialsPasswordChangeTooSoon@5407$kODErrorCredentialsPasswordExpired@5400$kODErrorCredentialsPasswordNeedsDigit@5406$kODErrorCredentialsPasswordNeedsLetter@5405$kODErrorCredentialsPasswordQualityFailed@5402$kODErrorCredentialsPasswordTooLong@5404$kODErrorCredentialsPasswordTooShort@5403$kODErrorCredentialsPasswordUnrecoverable@5408$kODErrorCredentialsServerCommunicationError@5205$kODErrorCredentialsServerError@5202$kODErrorCredentialsServerNotFound@5201$kODErrorCredentialsServerTimeout@5203$kODErrorCredentialsServerUnreachable@5200$kODErrorDaemonError@10002$kODErrorNodeConnectionFailed@2100$kODErrorNodeDisabled@2002$kODErrorNodeUnknownHost@2200$kODErrorNodeUnknownName@2000$kODErrorNodeUnknownType@2001$kODErrorPluginError@10001$kODErrorPluginOperationNotSupported@10000$kODErrorPluginOperationTimeout@10003$kODErrorQueryInvalidMatchType@3100$kODErrorQuerySynchronize@3000$kODErrorQueryTimeout@3102$kODErrorQueryUnsupportedMatchType@3101$kODErrorRecordAlreadyExists@4102$kODErrorRecordAttributeNotFound@4201$kODErrorRecordAttributeUnknownType@4200$kODErrorRecordAttributeValueNotFound@4203$kODErrorRecordAttributeValueSchemaError@4202$kODErrorRecordInvalidType@4101$kODErrorRecordNoLongerExists@4104$kODErrorRecordParameterError@4100$kODErrorRecordPermissionError@4001$kODErrorRecordReadOnlyNode@4000$kODErrorRecordTypeDisabled@4103$kODErrorSessionDaemonNotRunning@1002$kODErrorSessionDaemonRefused@1003$kODErrorSessionLocalOnlyDaemonInUse@1000$kODErrorSessionNormalDaemonInUse@1001$kODErrorSessionProxyCommunicationError@1100$kODErrorSessionProxyIPUnreachable@1102$kODErrorSessionProxyUnknownHost@1103$kODErrorSessionProxyVersionMismatch@1101$kODErrorSuccess@0$kODMatchAny@1$kODMatchBeginsWith@8194$kODMatchContains@8196$kODMatchEndsWith@8195$kODMatchEqualTo@8193$kODMatchGreaterThan@8198$kODMatchInsensitiveBeginsWith@8450$kODMatchInsensitiveContains@8452$kODMatchInsensitiveEndsWith@8451$kODMatchInsensitiveEqualTo@8449$kODMatchLessThan@8199$kODNodeTypeAuthentication@8705$kODNodeTypeConfigure@8706$kODNodeTypeContacts@8708$kODNodeTypeLocalNodes@8704$kODNodeTypeNetwork@8709$'''
 misc.update({})
-functions={'ODNodeCopySubnodeNames': (b'@^{__ODNode=}^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeSetCredentialsExtended': (b'B^{__ODNode=}@@@^@^^{__ODContext=}^^{__CFError=}', '', {'arguments': {6: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODSessionCopyNodeNames': (b'@^{__CFAllocator=}^{__ODSession=}^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeGetTypeID': (b'L',), 'ODNodeCustomCall': (b'^{__CFData=}^{__ODNode=}l^{__CFData=}^^{__CFError=}', '', {'arguments': {3: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordDelete': (b'B^{__ODRecord=}^^{__CFError=}', '', {'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordSetNodeCredentials': (b'B^{__ODRecord=}^{__CFString=}^{__CFString=}^^{__CFError=}', '', {'arguments': {3: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordGetRecordName': (b'^{__CFString=}^{__ODRecord=}',), 'ODQueryScheduleWithRunLoop': (b'v^{__ODQuery=}^{__CFRunLoop=}^{__CFString=}',), 'ODQuerySetCallback': (b'v^{__ODQuery=}^?^v', '', {'arguments': {1: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^{__ODQuery=}'}, 1: {'type': b'@'}, 2: {'type': b'^{__CFError=}'}, 3: {'type': b'^v'}}}}}}), 'ODRecordAddMember': (b'B^{__ODRecord=}^{__ODRecord=}^^{__CFError=}', '', {'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordCopyValues': (b'@^{__ODRecord=}@^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODQuerySynchronize': (b'v^{__ODQuery=}',), 'ODNodeCreateCopy': (b'^{__ODNode=}^{__CFAllocator=}^{__ODNode=}^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordCopyDetails': (b'^{__CFDictionary=}^{__ODRecord=}@^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordGetRecordType': (b'^{__CFString=}^{__ODRecord=}',), 'ODNodeCopyRecord': (b'^{__ODRecord=}^{__ODNode=}@^{__CFString=}@^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {4: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeGetName': (b'^{__CFString=}^{__ODNode=}',), 'ODSessionCreate': (b'^{__ODSession=}^{__CFAllocator=}^{__CFDictionary=}^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordContainsMember': (b'B^{__ODRecord=}^{__ODRecord=}^^{__CFError=}', '', {'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordSynchronize': (b'B^{__ODRecord=}^^{__CFError=}', '', {'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODQueryCreateWithNodeType': (b'^{__ODQuery=}^{__CFAllocator=}I@@I@@l^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {8: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeCopySupportedRecordTypes': (b'@^{__ODNode=}^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODQuerySetDispatchQueue': (b'v^{__ODQuery=}^{dispatch_queue_s=}',), 'ODRecordVerifyPassword': (b'B^{__ODRecord=}^{__CFString=}^^{__CFError=}', '', {'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeCopyDetails': (b'^{__CFDictionary=}^{__ODNode=}@^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODQueryCreateWithNode': (b'^{__ODQuery=}^{__CFAllocator=}^{__ODNode=}@@I@@l^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {8: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODContextGetTypeID': (b'L',), 'ODQueryCopyResults': (b'@^{__ODQuery=}B^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordCopyPasswordPolicy': (b'^{__CFDictionary=}^{__CFAllocator=}^{__ODRecord=}^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeSetCredentials': (b'B^{__ODNode=}@^{__CFString=}^{__CFString=}^^{__CFError=}', '', {'arguments': {4: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeCreateRecord': (b'^{__ODRecord=}^{__ODNode=}@^{__CFString=}^{__CFDictionary=}^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {4: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordSetValue': (b'B^{__ODRecord=}@@^^{__CFError=}', '', {'arguments': {3: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordSetNodeCredentialsExtended': (b'B^{__ODRecord=}@@@^@^^{__ODContext=}^^{__CFError=}', '', {'arguments': {6: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODQueryGetTypeID': (b'L',), 'ODRecordSetNodeCredentialsUsingKerberosCache': (b'B^{__ODRecord=}^{__CFString=}^^{__CFError=}', '', {'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeCreateWithName': (b'^{__ODNode=}^{__CFAllocator=}^{__ODSession=}^{__CFString=}^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {3: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordRemoveValue': (b'B^{__ODRecord=}@@^^{__CFError=}', '', {'arguments': {3: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODSessionGetTypeID': (b'L',), 'ODNodeCopySupportedAttributes': (b'@^{__ODNode=}@^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeSetCredentialsUsingKerberosCache': (b'B^{__ODNode=}^{__CFString=}^^{__CFError=}', '', {'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordChangePassword': (b'B^{__ODRecord=}^{__CFString=}^{__CFString=}^^{__CFError=}', '', {'arguments': {3: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordGetTypeID': (b'L',), 'ODRecordVerifyPasswordExtended': (b'B^{__ODRecord=}@@^@^^{__ODContext=}^^{__CFError=}', '', {'arguments': {5: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODRecordRemoveMember': (b'B^{__ODRecord=}^{__ODRecord=}^^{__CFError=}', '', {'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeCreateWithNodeType': (b'^{__ODNode=}^{__CFAllocator=}^{__ODSession=}I^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {3: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODNodeCopyUnreachableSubnodeNames': (b'@^{__ODNode=}^^{__CFError=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}}), 'ODQueryUnscheduleFromRunLoop': (b'v^{__ODQuery=}^{__CFRunLoop=}^{__CFString=}',), 'ODRecordAddValue': (b'B^{__ODRecord=}@@^^{__CFError=}', '', {'arguments': {3: {'already_cfretained': True, 'type_modifier': 'o', 'null_accepted': True}}})}
-cftypes=[('ODContextRef', b'^{__ODContext=}', None, None), ('ODNodeRef', b'^{__ODNode=}', None, None), ('ODQueryRef', b'^{__ODQuery=}', None, None), ('ODRecordRef', b'^{__ODRecord=}', None, None), ('ODSessionRef', b'^{__ODSession=}', None, None)]
-r = objc.registerMetaDataForSelector
-objc._updatingMetadata(True)
-try:
-    r(b'ODNode', b'setCredentialsUsingKerberosCache:error:', {'retval': {'type': b'Z'}})
-    r(b'ODNode', b'setCredentialsWithRecordType:authenticationType:authenticationItems:continueItems:context:error:', {'retval': {'type': b'Z'}})
-    r(b'ODNode', b'setCredentialsWithRecordType:recordName:password:error:', {'retval': {'type': b'Z'}})
-    r(b'ODQuery', b'resultsAllowingPartial:error:', {'arguments': {2: {'type': b'Z'}}})
-    r(b'ODRecord', b'addMemberRecord:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'addValue:toAttribute:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'changePassword:toPassword:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'deleteRecordAndReturnError:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'isMemberRecord:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'removeMemberRecord:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'removeValue:fromAttribute:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'removeValuesForAttribute:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'setNodeCredentials:password:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'setNodeCredentialsUsingKerberosCache:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'setNodeCredentialsWithRecordType:authenticationType:authenticationItems:continueItems:context:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'setValue:forAttribute:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'synchronizeAndReturnError:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'verifyExtendedWithAuthenticationType:authenticationItems:continueItems:context:error:', {'retval': {'type': b'Z'}})
-    r(b'ODRecord', b'verifyPassword:error:', {'retval': {'type': b'Z'}})
-finally:
-    objc._updatingMetadata(False)
-r = objc.registerMetaDataForSelector
-objc._updatingMetadata(True)
-try:
-    r(b'NSObject', b'query:foundResults:error:', {'required': True, 'retval': {'type': b'v'}, 'arguments': {2: {'type': b'@'}, 3: {'type': b'@'}, 4: {'type': b'@'}}})
-finally:
-    objc._updatingMetadata(False)
-expressions = {}
-
-# END OF FILE

File pyobjc-framework-Quartz/Doc/api-notes-CoreGraphics.txt

View file
 
    This functions are not yet supported.
 
+
+* ``CGDataProviderCreate``, ``CGDataProviderCreateDirectAccess``
+
+  These functions are not available when you build PyObjC on OSX 10.8,
+  even when you run on earlier releases of OSX.

File pyobjc-framework-Quartz/Modules/_callbacks.m

View file
 #include "pyobjc-api.h"
 
 #import <ApplicationServices/ApplicationServices.h>
+#if PyObjC_BUILD_RELEASE > 1008
+#import <CoreGraphics/CoreGraphics.h>
+#endif
 
 
 /* 
 	return c_result;
 }
 
+#if PyObjC_BUILD_RELEASE < 1008
+
 static void 
 m_CGDataProviderSkipBytesCallback(void* _info, size_t count)
 {
 	PyGILState_Release(state);
 }
 
+#endif
+
 static void 
 m_CGDataProviderRewindCallback(void* _info)
 {
 	PyGILState_Release(state);
 }
 
+#if PyObjC_BUILD_RELEASE < 1008
 static CGDataProviderCallbacks m_CGDataProviderCallbacks = {
 	m_CGDataProviderGetBytesCallback, 	/*  getBytes */
 	m_CGDataProviderSkipBytesCallback,	/*  skipBytes */
 	m_CGDataProviderRewindCallback,		/*  rewind */
 	m_CGDataProviderReleaseInfoCallback	/*  releaseProvider */
 };
+#endif /* PyObjC_BUILD_RELEASE < 1008 */
 
+#if PyObjC_BUILD_RELEASE < 1008
 static const void*
 m_CGDataProviderGetBytePointerCallback(void* _info)
 {
 	m_CGDataProviderGetBytesAtOffsetCallback,	/* getBytes */
 	m_CGDataProviderReleaseInfoCallback		/* releaseProvider */
 };
+#endif /* PyObjC_BUILD_RELEASE < 1008 */
 
 
 
 #endif
 
 
+#if PyObjC_BUILD_RELEASE < 1008
 PyDoc_STRVAR(doc_CGDataProviderCreate,
 	"CGDataConsumerCreate(info, (getBytes, skipBytes, rewind, releaseProvider)) -> object\n"
 	"\n"
 	CGDataProviderRelease(result);
 	return retval;
 }
+#endif
 
 /*
  * CGDataProviderCreateWithData
 		doc_CGDataConsumerCreate
 	},
 
+#if PyObjC_BUILD_RELEASE < 1008
 	{
 		"CGDataProviderCreate",
 		(PyCFunction)m_CGDataProviderCreate,
 		METH_VARARGS,
 		doc_CGDataProviderCreateDirectAccess
 	},
+#endif
 
 #if PyObjC_BUILD_RELEASE >= 1005