Commits

Ronald Oussoren  committed 4537083

- Add flag to objc.informal_protocol constructor to disable warnings for
some protocols. This is temporary: We can do away with informal protocols
in class definitions and use the list of protocols to deduce the protocols
implemented by a newly defined class. (Thanks to Just for the idea)
- Scripts/gen_test_methods.py generated bad method signatures for
PyObjC_TestClass2, hence the test failures.
- Fixed writing output arguments back into the Objective-C values (for the
method-stub, the invoke version is correct).
- Hurray! All method-passing tests now pass.

  • Participants
  • Parent commits d193d84

Comments (0)

Files changed (6)

File pyobjc/Lib/AppKit/__init__.py

             signature='v@:',
             isRequired=1
         ),
-    ]
+    ],
+    warnIfUndeclared= 0 # There's little change of problems, and 
+                        # there's the issue of backward compatibility.
 )
 
 NSOutlineViewDelegate = _objc.informal_protocol(

File pyobjc/Lib/objc/test/test_methods2.py

 set_signature("PyObjC_TestClass1", "BOOLInOutArg:", "@@:N^c")
 set_signature("PyObjC_TestClass1", "BOOLOutArg:", "v@:o^c")
 set_signature("PyObjC_TestClass1", "BOOLInArg:", "@@:n^c")
-set_signature("PyObjC_TestClass2", "callBOOLInOutArg:", "@@:N^c")
-set_signature("PyObjC_TestClass2", "callBOOLOutArg:", "v@:o^c")
-set_signature("PyObjC_TestClass2", "callBOOLInArg:", "@@:n^c")
-set_signature("PyObjC_TestClass2", "invokeBOOLInOutArg:", "@@:N^c")
-set_signature("PyObjC_TestClass2", "invokeBOOLOutArg:", "v@:o^c")
-set_signature("PyObjC_TestClass2", "invokeBOOLInArg:", "@@:n^c")
+set_signature("PyObjC_TestClass2", "callBOOLInOutArg:of:", "@@:N^c@")
+set_signature("PyObjC_TestClass2", "callBOOLOutArg:of:", "v@:o^c@")
+set_signature("PyObjC_TestClass2", "callBOOLInArg:of:", "@@:n^c@")
+set_signature("PyObjC_TestClass2", "invokeBOOLInOutArg:of:", "@@:N^c@")
+set_signature("PyObjC_TestClass2", "invokeBOOLOutArg:of:", "v@:o^c@")
+set_signature("PyObjC_TestClass2", "invokeBOOLInArg:of:", "@@:n^c@")
 set_signature("PyObjC_TestClass1", "charInOutArg:", "@@:N^c")
 set_signature("PyObjC_TestClass1", "charOutArg:", "v@:o^c")
 set_signature("PyObjC_TestClass1", "charInArg:", "@@:n^c")
-set_signature("PyObjC_TestClass2", "callcharInOutArg:", "@@:N^c")
-set_signature("PyObjC_TestClass2", "callcharOutArg:", "v@:o^c")
-set_signature("PyObjC_TestClass2", "callcharInArg:", "@@:n^c")
-set_signature("PyObjC_TestClass2", "invokecharInOutArg:", "@@:N^c")
-set_signature("PyObjC_TestClass2", "invokecharOutArg:", "v@:o^c")
-set_signature("PyObjC_TestClass2", "invokecharInArg:", "@@:n^c")
+set_signature("PyObjC_TestClass2", "callcharInOutArg:of:", "@@:N^c@")
+set_signature("PyObjC_TestClass2", "callcharOutArg:of:", "v@:o^c@")
+set_signature("PyObjC_TestClass2", "callcharInArg:of:", "@@:n^c@")
+set_signature("PyObjC_TestClass2", "invokecharInOutArg:of:", "@@:N^c@")
+set_signature("PyObjC_TestClass2", "invokecharOutArg:of:", "v@:o^c@")
+set_signature("PyObjC_TestClass2", "invokecharInArg:of:", "@@:n^c@")
 set_signature("PyObjC_TestClass1", "signedshortInOutArg:", "@@:N^s")
 set_signature("PyObjC_TestClass1", "signedshortOutArg:", "v@:o^s")
 set_signature("PyObjC_TestClass1", "signedshortInArg:", "@@:n^s")
-set_signature("PyObjC_TestClass2", "callsignedshortInOutArg:", "@@:N^s")
-set_signature("PyObjC_TestClass2", "callsignedshortOutArg:", "v@:o^s")
-set_signature("PyObjC_TestClass2", "callsignedshortInArg:", "@@:n^s")
-set_signature("PyObjC_TestClass2", "invokesignedshortInOutArg:", "@@:N^s")
-set_signature("PyObjC_TestClass2", "invokesignedshortOutArg:", "v@:o^s")
-set_signature("PyObjC_TestClass2", "invokesignedshortInArg:", "@@:n^s")
+set_signature("PyObjC_TestClass2", "callsignedshortInOutArg:of:", "@@:N^s@")
+set_signature("PyObjC_TestClass2", "callsignedshortOutArg:of:", "v@:o^s@")
+set_signature("PyObjC_TestClass2", "callsignedshortInArg:of:", "@@:n^s@")
+set_signature("PyObjC_TestClass2", "invokesignedshortInOutArg:of:", "@@:N^s@")
+set_signature("PyObjC_TestClass2", "invokesignedshortOutArg:of:", "v@:o^s@")
+set_signature("PyObjC_TestClass2", "invokesignedshortInArg:of:", "@@:n^s@")
 set_signature("PyObjC_TestClass1", "signedintInOutArg:", "@@:N^i")
 set_signature("PyObjC_TestClass1", "signedintOutArg:", "v@:o^i")
 set_signature("PyObjC_TestClass1", "signedintInArg:", "@@:n^i")
-set_signature("PyObjC_TestClass2", "callsignedintInOutArg:", "@@:N^i")
-set_signature("PyObjC_TestClass2", "callsignedintOutArg:", "v@:o^i")
-set_signature("PyObjC_TestClass2", "callsignedintInArg:", "@@:n^i")
-set_signature("PyObjC_TestClass2", "invokesignedintInOutArg:", "@@:N^i")
-set_signature("PyObjC_TestClass2", "invokesignedintOutArg:", "v@:o^i")
-set_signature("PyObjC_TestClass2", "invokesignedintInArg:", "@@:n^i")
+set_signature("PyObjC_TestClass2", "callsignedintInOutArg:of:", "@@:N^i@")
+set_signature("PyObjC_TestClass2", "callsignedintOutArg:of:", "v@:o^i@")
+set_signature("PyObjC_TestClass2", "callsignedintInArg:of:", "@@:n^i@")
+set_signature("PyObjC_TestClass2", "invokesignedintInOutArg:of:", "@@:N^i@")
+set_signature("PyObjC_TestClass2", "invokesignedintOutArg:of:", "v@:o^i@")
+set_signature("PyObjC_TestClass2", "invokesignedintInArg:of:", "@@:n^i@")
 set_signature("PyObjC_TestClass1", "signedlongInOutArg:", "@@:N^l")
 set_signature("PyObjC_TestClass1", "signedlongOutArg:", "v@:o^l")
 set_signature("PyObjC_TestClass1", "signedlongInArg:", "@@:n^l")
-set_signature("PyObjC_TestClass2", "callsignedlongInOutArg:", "@@:N^l")
-set_signature("PyObjC_TestClass2", "callsignedlongOutArg:", "v@:o^l")
-set_signature("PyObjC_TestClass2", "callsignedlongInArg:", "@@:n^l")
-set_signature("PyObjC_TestClass2", "invokesignedlongInOutArg:", "@@:N^l")
-set_signature("PyObjC_TestClass2", "invokesignedlongOutArg:", "v@:o^l")
-set_signature("PyObjC_TestClass2", "invokesignedlongInArg:", "@@:n^l")
+set_signature("PyObjC_TestClass2", "callsignedlongInOutArg:of:", "@@:N^l@")
+set_signature("PyObjC_TestClass2", "callsignedlongOutArg:of:", "v@:o^l@")
+set_signature("PyObjC_TestClass2", "callsignedlongInArg:of:", "@@:n^l@")
+set_signature("PyObjC_TestClass2", "invokesignedlongInOutArg:of:", "@@:N^l@")
+set_signature("PyObjC_TestClass2", "invokesignedlongOutArg:of:", "v@:o^l@")
+set_signature("PyObjC_TestClass2", "invokesignedlongInArg:of:", "@@:n^l@")
 set_signature("PyObjC_TestClass1", "signedlonglongInOutArg:", "@@:N^q")
 set_signature("PyObjC_TestClass1", "signedlonglongOutArg:", "v@:o^q")
 set_signature("PyObjC_TestClass1", "signedlonglongInArg:", "@@:n^q")
-set_signature("PyObjC_TestClass2", "callsignedlonglongInOutArg:", "@@:N^q")
-set_signature("PyObjC_TestClass2", "callsignedlonglongOutArg:", "v@:o^q")
-set_signature("PyObjC_TestClass2", "callsignedlonglongInArg:", "@@:n^q")
-set_signature("PyObjC_TestClass2", "invokesignedlonglongInOutArg:", "@@:N^q")
-set_signature("PyObjC_TestClass2", "invokesignedlonglongOutArg:", "v@:o^q")
-set_signature("PyObjC_TestClass2", "invokesignedlonglongInArg:", "@@:n^q")
+set_signature("PyObjC_TestClass2", "callsignedlonglongInOutArg:of:", "@@:N^q@")
+set_signature("PyObjC_TestClass2", "callsignedlonglongOutArg:of:", "v@:o^q@")
+set_signature("PyObjC_TestClass2", "callsignedlonglongInArg:of:", "@@:n^q@")
+set_signature("PyObjC_TestClass2", "invokesignedlonglongInOutArg:of:", "@@:N^q@")
+set_signature("PyObjC_TestClass2", "invokesignedlonglongOutArg:of:", "v@:o^q@")
+set_signature("PyObjC_TestClass2", "invokesignedlonglongInArg:of:", "@@:n^q@")
 set_signature("PyObjC_TestClass1", "unsignedcharInOutArg:", "@@:N^C")
 set_signature("PyObjC_TestClass1", "unsignedcharOutArg:", "v@:o^C")
 set_signature("PyObjC_TestClass1", "unsignedcharInArg:", "@@:n^C")
-set_signature("PyObjC_TestClass2", "callunsignedcharInOutArg:", "@@:N^C")
-set_signature("PyObjC_TestClass2", "callunsignedcharOutArg:", "v@:o^C")
-set_signature("PyObjC_TestClass2", "callunsignedcharInArg:", "@@:n^C")
-set_signature("PyObjC_TestClass2", "invokeunsignedcharInOutArg:", "@@:N^C")
-set_signature("PyObjC_TestClass2", "invokeunsignedcharOutArg:", "v@:o^C")
-set_signature("PyObjC_TestClass2", "invokeunsignedcharInArg:", "@@:n^C")
+set_signature("PyObjC_TestClass2", "callunsignedcharInOutArg:of:", "@@:N^C@")
+set_signature("PyObjC_TestClass2", "callunsignedcharOutArg:of:", "v@:o^C@")
+set_signature("PyObjC_TestClass2", "callunsignedcharInArg:of:", "@@:n^C@")
+set_signature("PyObjC_TestClass2", "invokeunsignedcharInOutArg:of:", "@@:N^C@")
+set_signature("PyObjC_TestClass2", "invokeunsignedcharOutArg:of:", "v@:o^C@")
+set_signature("PyObjC_TestClass2", "invokeunsignedcharInArg:of:", "@@:n^C@")
 set_signature("PyObjC_TestClass1", "unsignedshortInOutArg:", "@@:N^S")
 set_signature("PyObjC_TestClass1", "unsignedshortOutArg:", "v@:o^S")
 set_signature("PyObjC_TestClass1", "unsignedshortInArg:", "@@:n^S")
-set_signature("PyObjC_TestClass2", "callunsignedshortInOutArg:", "@@:N^S")
-set_signature("PyObjC_TestClass2", "callunsignedshortOutArg:", "v@:o^S")
-set_signature("PyObjC_TestClass2", "callunsignedshortInArg:", "@@:n^S")
-set_signature("PyObjC_TestClass2", "invokeunsignedshortInOutArg:", "@@:N^S")
-set_signature("PyObjC_TestClass2", "invokeunsignedshortOutArg:", "v@:o^S")
-set_signature("PyObjC_TestClass2", "invokeunsignedshortInArg:", "@@:n^S")
+set_signature("PyObjC_TestClass2", "callunsignedshortInOutArg:of:", "@@:N^S@")
+set_signature("PyObjC_TestClass2", "callunsignedshortOutArg:of:", "v@:o^S@")
+set_signature("PyObjC_TestClass2", "callunsignedshortInArg:of:", "@@:n^S@")
+set_signature("PyObjC_TestClass2", "invokeunsignedshortInOutArg:of:", "@@:N^S@")
+set_signature("PyObjC_TestClass2", "invokeunsignedshortOutArg:of:", "v@:o^S@")
+set_signature("PyObjC_TestClass2", "invokeunsignedshortInArg:of:", "@@:n^S@")
 set_signature("PyObjC_TestClass1", "unsignedintInOutArg:", "@@:N^I")
 set_signature("PyObjC_TestClass1", "unsignedintOutArg:", "v@:o^I")
 set_signature("PyObjC_TestClass1", "unsignedintInArg:", "@@:n^I")
-set_signature("PyObjC_TestClass2", "callunsignedintInOutArg:", "@@:N^I")
-set_signature("PyObjC_TestClass2", "callunsignedintOutArg:", "v@:o^I")
-set_signature("PyObjC_TestClass2", "callunsignedintInArg:", "@@:n^I")
-set_signature("PyObjC_TestClass2", "invokeunsignedintInOutArg:", "@@:N^I")
-set_signature("PyObjC_TestClass2", "invokeunsignedintOutArg:", "v@:o^I")
-set_signature("PyObjC_TestClass2", "invokeunsignedintInArg:", "@@:n^I")
+set_signature("PyObjC_TestClass2", "callunsignedintInOutArg:of:", "@@:N^I@")
+set_signature("PyObjC_TestClass2", "callunsignedintOutArg:of:", "v@:o^I@")
+set_signature("PyObjC_TestClass2", "callunsignedintInArg:of:", "@@:n^I@")
+set_signature("PyObjC_TestClass2", "invokeunsignedintInOutArg:of:", "@@:N^I@")
+set_signature("PyObjC_TestClass2", "invokeunsignedintOutArg:of:", "v@:o^I@")
+set_signature("PyObjC_TestClass2", "invokeunsignedintInArg:of:", "@@:n^I@")
 set_signature("PyObjC_TestClass1", "unsignedlongInOutArg:", "@@:N^L")
 set_signature("PyObjC_TestClass1", "unsignedlongOutArg:", "v@:o^L")
 set_signature("PyObjC_TestClass1", "unsignedlongInArg:", "@@:n^L")
-set_signature("PyObjC_TestClass2", "callunsignedlongInOutArg:", "@@:N^L")
-set_signature("PyObjC_TestClass2", "callunsignedlongOutArg:", "v@:o^L")
-set_signature("PyObjC_TestClass2", "callunsignedlongInArg:", "@@:n^L")
-set_signature("PyObjC_TestClass2", "invokeunsignedlongInOutArg:", "@@:N^L")
-set_signature("PyObjC_TestClass2", "invokeunsignedlongOutArg:", "v@:o^L")
-set_signature("PyObjC_TestClass2", "invokeunsignedlongInArg:", "@@:n^L")
+set_signature("PyObjC_TestClass2", "callunsignedlongInOutArg:of:", "@@:N^L@")
+set_signature("PyObjC_TestClass2", "callunsignedlongOutArg:of:", "v@:o^L@")
+set_signature("PyObjC_TestClass2", "callunsignedlongInArg:of:", "@@:n^L@")
+set_signature("PyObjC_TestClass2", "invokeunsignedlongInOutArg:of:", "@@:N^L@")
+set_signature("PyObjC_TestClass2", "invokeunsignedlongOutArg:of:", "v@:o^L@")
+set_signature("PyObjC_TestClass2", "invokeunsignedlongInArg:of:", "@@:n^L@")
 set_signature("PyObjC_TestClass1", "unsignedlonglongInOutArg:", "@@:N^Q")
 set_signature("PyObjC_TestClass1", "unsignedlonglongOutArg:", "v@:o^Q")
 set_signature("PyObjC_TestClass1", "unsignedlonglongInArg:", "@@:n^Q")
-set_signature("PyObjC_TestClass2", "callunsignedlonglongInOutArg:", "@@:N^Q")
-set_signature("PyObjC_TestClass2", "callunsignedlonglongOutArg:", "v@:o^Q")
-set_signature("PyObjC_TestClass2", "callunsignedlonglongInArg:", "@@:n^Q")
-set_signature("PyObjC_TestClass2", "invokeunsignedlonglongInOutArg:", "@@:N^Q")
-set_signature("PyObjC_TestClass2", "invokeunsignedlonglongOutArg:", "v@:o^Q")
-set_signature("PyObjC_TestClass2", "invokeunsignedlonglongInArg:", "@@:n^Q")
+set_signature("PyObjC_TestClass2", "callunsignedlonglongInOutArg:of:", "@@:N^Q@")
+set_signature("PyObjC_TestClass2", "callunsignedlonglongOutArg:of:", "v@:o^Q@")
+set_signature("PyObjC_TestClass2", "callunsignedlonglongInArg:of:", "@@:n^Q@")
+set_signature("PyObjC_TestClass2", "invokeunsignedlonglongInOutArg:of:", "@@:N^Q@")
+set_signature("PyObjC_TestClass2", "invokeunsignedlonglongOutArg:of:", "v@:o^Q@")
+set_signature("PyObjC_TestClass2", "invokeunsignedlonglongInArg:of:", "@@:n^Q@")
 set_signature("PyObjC_TestClass1", "floatInOutArg:", "@@:N^f")
 set_signature("PyObjC_TestClass1", "floatOutArg:", "v@:o^f")
 set_signature("PyObjC_TestClass1", "floatInArg:", "@@:n^f")
-set_signature("PyObjC_TestClass2", "callfloatInOutArg:", "@@:N^f")
-set_signature("PyObjC_TestClass2", "callfloatOutArg:", "v@:o^f")
-set_signature("PyObjC_TestClass2", "callfloatInArg:", "@@:n^f")
-set_signature("PyObjC_TestClass2", "invokefloatInOutArg:", "@@:N^f")
-set_signature("PyObjC_TestClass2", "invokefloatOutArg:", "v@:o^f")
-set_signature("PyObjC_TestClass2", "invokefloatInArg:", "@@:n^f")
+set_signature("PyObjC_TestClass2", "callfloatInOutArg:of:", "@@:N^f@")
+set_signature("PyObjC_TestClass2", "callfloatOutArg:of:", "v@:o^f@")
+set_signature("PyObjC_TestClass2", "callfloatInArg:of:", "@@:n^f@")
+set_signature("PyObjC_TestClass2", "invokefloatInOutArg:of:", "@@:N^f@")
+set_signature("PyObjC_TestClass2", "invokefloatOutArg:of:", "v@:o^f@")
+set_signature("PyObjC_TestClass2", "invokefloatInArg:of:", "@@:n^f@")
 set_signature("PyObjC_TestClass1", "doubleInOutArg:", "@@:N^d")
 set_signature("PyObjC_TestClass1", "doubleOutArg:", "v@:o^d")
 set_signature("PyObjC_TestClass1", "doubleInArg:", "@@:n^d")
-set_signature("PyObjC_TestClass2", "calldoubleInOutArg:", "@@:N^d")
-set_signature("PyObjC_TestClass2", "calldoubleOutArg:", "v@:o^d")
-set_signature("PyObjC_TestClass2", "calldoubleInArg:", "@@:n^d")
-set_signature("PyObjC_TestClass2", "invokedoubleInOutArg:", "@@:N^d")
-set_signature("PyObjC_TestClass2", "invokedoubleOutArg:", "v@:o^d")
-set_signature("PyObjC_TestClass2", "invokedoubleInArg:", "@@:n^d")
+set_signature("PyObjC_TestClass2", "calldoubleInOutArg:of:", "@@:N^d@")
+set_signature("PyObjC_TestClass2", "calldoubleOutArg:of:", "v@:o^d@")
+set_signature("PyObjC_TestClass2", "calldoubleInArg:of:", "@@:n^d@")
+set_signature("PyObjC_TestClass2", "invokedoubleInOutArg:of:", "@@:N^d@")
+set_signature("PyObjC_TestClass2", "invokedoubleOutArg:of:", "v@:o^d@")
+set_signature("PyObjC_TestClass2", "invokedoubleInArg:of:", "@@:n^d@")
 set_signature("PyObjC_TestClass1", "idInOutArg:", "@@:N^@")
 set_signature("PyObjC_TestClass1", "idOutArg:", "v@:o^@")
 set_signature("PyObjC_TestClass1", "idInArg:", "@@:n^@")
-set_signature("PyObjC_TestClass2", "callidInOutArg:", "@@:N^@")
-set_signature("PyObjC_TestClass2", "callidOutArg:", "v@:o^@")
-set_signature("PyObjC_TestClass2", "callidInArg:", "@@:n^@")
-set_signature("PyObjC_TestClass2", "invokeidInOutArg:", "@@:N^@")
-set_signature("PyObjC_TestClass2", "invokeidOutArg:", "v@:o^@")
-set_signature("PyObjC_TestClass2", "invokeidInArg:", "@@:n^@")
+set_signature("PyObjC_TestClass2", "callidInOutArg:of:", "@@:N^@@")
+set_signature("PyObjC_TestClass2", "callidOutArg:of:", "v@:o^@@")
+set_signature("PyObjC_TestClass2", "callidInArg:of:", "@@:n^@@")
+set_signature("PyObjC_TestClass2", "invokeidInOutArg:of:", "@@:N^@@")
+set_signature("PyObjC_TestClass2", "invokeidOutArg:of:", "v@:o^@@")
+set_signature("PyObjC_TestClass2", "invokeidInArg:of:", "@@:n^@@")
 set_signature("PyObjC_TestClass1", "charPtrInOutArg:", "@@:N^*")
 set_signature("PyObjC_TestClass1", "charPtrOutArg:", "v@:o^*")
 set_signature("PyObjC_TestClass1", "charPtrInArg:", "@@:n^*")
-set_signature("PyObjC_TestClass2", "callcharPtrInOutArg:", "@@:N^*")
-set_signature("PyObjC_TestClass2", "callcharPtrOutArg:", "v@:o^*")
-set_signature("PyObjC_TestClass2", "callcharPtrInArg:", "@@:n^*")
-set_signature("PyObjC_TestClass2", "invokecharPtrInOutArg:", "@@:N^*")
-set_signature("PyObjC_TestClass2", "invokecharPtrOutArg:", "v@:o^*")
-set_signature("PyObjC_TestClass2", "invokecharPtrInArg:", "@@:n^*")
+set_signature("PyObjC_TestClass2", "callcharPtrInOutArg:of:", "@@:N^*@")
+set_signature("PyObjC_TestClass2", "callcharPtrOutArg:of:", "v@:o^*@")
+set_signature("PyObjC_TestClass2", "callcharPtrInArg:of:", "@@:n^*@")
+set_signature("PyObjC_TestClass2", "invokecharPtrInOutArg:of:", "@@:N^*@")
+set_signature("PyObjC_TestClass2", "invokecharPtrOutArg:of:", "v@:o^*@")
+set_signature("PyObjC_TestClass2", "invokecharPtrInArg:of:", "@@:n^*@")
 set_signature("PyObjC_TestClass1", "NSPointInOutArg:", "@@:N^{_NSPoint=ff}")
 set_signature("PyObjC_TestClass1", "NSPointOutArg:", "v@:o^{_NSPoint=ff}")
 set_signature("PyObjC_TestClass1", "NSPointInArg:", "@@:n^{_NSPoint=ff}")
-set_signature("PyObjC_TestClass2", "callNSPointInOutArg:", "@@:N^{_NSPoint=ff}")
-set_signature("PyObjC_TestClass2", "callNSPointOutArg:", "v@:o^{_NSPoint=ff}")
-set_signature("PyObjC_TestClass2", "callNSPointInArg:", "@@:n^{_NSPoint=ff}")
-set_signature("PyObjC_TestClass2", "invokeNSPointInOutArg:", "@@:N^{_NSPoint=ff}")
-set_signature("PyObjC_TestClass2", "invokeNSPointOutArg:", "v@:o^{_NSPoint=ff}")
-set_signature("PyObjC_TestClass2", "invokeNSPointInArg:", "@@:n^{_NSPoint=ff}")
+set_signature("PyObjC_TestClass2", "callNSPointInOutArg:of:", "@@:N^{_NSPoint=ff}@")
+set_signature("PyObjC_TestClass2", "callNSPointOutArg:of:", "v@:o^{_NSPoint=ff}@")
+set_signature("PyObjC_TestClass2", "callNSPointInArg:of:", "@@:n^{_NSPoint=ff}@")
+set_signature("PyObjC_TestClass2", "invokeNSPointInOutArg:of:", "@@:N^{_NSPoint=ff}@")
+set_signature("PyObjC_TestClass2", "invokeNSPointOutArg:of:", "v@:o^{_NSPoint=ff}@")
+set_signature("PyObjC_TestClass2", "invokeNSPointInArg:of:", "@@:n^{_NSPoint=ff}@")
 set_signature("PyObjC_TestClass1", "NSRectInOutArg:", "@@:N^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
 set_signature("PyObjC_TestClass1", "NSRectOutArg:", "v@:o^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
 set_signature("PyObjC_TestClass1", "NSRectInArg:", "@@:n^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
-set_signature("PyObjC_TestClass2", "callNSRectInOutArg:", "@@:N^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
-set_signature("PyObjC_TestClass2", "callNSRectOutArg:", "v@:o^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
-set_signature("PyObjC_TestClass2", "callNSRectInArg:", "@@:n^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
-set_signature("PyObjC_TestClass2", "invokeNSRectInOutArg:", "@@:N^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
-set_signature("PyObjC_TestClass2", "invokeNSRectOutArg:", "v@:o^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
-set_signature("PyObjC_TestClass2", "invokeNSRectInArg:", "@@:n^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
+set_signature("PyObjC_TestClass2", "callNSRectInOutArg:of:", "@@:N^{_NSRect={_NSPoint=ff}{_NSSize=ff}}@")
+set_signature("PyObjC_TestClass2", "callNSRectOutArg:of:", "v@:o^{_NSRect={_NSPoint=ff}{_NSSize=ff}}@")
+set_signature("PyObjC_TestClass2", "callNSRectInArg:of:", "@@:n^{_NSRect={_NSPoint=ff}{_NSSize=ff}}@")
+set_signature("PyObjC_TestClass2", "invokeNSRectInOutArg:of:", "@@:N^{_NSRect={_NSPoint=ff}{_NSSize=ff}}@")
+set_signature("PyObjC_TestClass2", "invokeNSRectOutArg:of:", "v@:o^{_NSRect={_NSPoint=ff}{_NSSize=ff}}@")
+set_signature("PyObjC_TestClass2", "invokeNSRectInArg:of:", "@@:n^{_NSRect={_NSPoint=ff}{_NSSize=ff}}@")
 
 from objc.test.testbndl2 import *
 

File pyobjc/Modules/objc/informal-protocol.m

 static PyObject*
 proto_new(PyTypeObject* type, PyObject* args, PyObject* kwds)
 {
-static	char*	keywords[] = { "name", "selectors", NULL };
+static	char*	keywords[] = { "name", "selectors", "warnIfUndeclared", NULL };
 	PyObjCInformalProtocol* result;
 	PyObject* name;
 	PyObject* selectors;
 	int       i, len;
+	int	  warnIfUndeclared = 1;
 
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO:informal_protocol",
-			keywords, &name, &selectors)) { 
+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO|i:informal_protocol",
+			keywords, &name, &selectors, &warnIfUndeclared)) { 
 		return NULL;
 	}
 
 	result->selectors = selectors;
 
 #if 1
-	len = PyTuple_Size(result->selectors);
-	for (i = 0; i < len; i++) {
-		if (!ObjCSelector_Check(PyTuple_GET_ITEM(selectors, i))) {
-			PyErr_Format(PyExc_TypeError, 
-				"Item %d is not a selector", i);
-			Py_DECREF(result);
-			return NULL;
+	if (warnIfUndeclared) {
+		len = PyTuple_Size(result->selectors);
+		for (i = 0; i < len; i++) {
+			if (!ObjCSelector_Check(
+					PyTuple_GET_ITEM(selectors, i))) {
+				PyErr_Format(PyExc_TypeError, 
+					"Item %d is not a selector", i);
+				Py_DECREF(result);
+				return NULL;
+			}
 		}
-	}
 
-	if (selToProtocolMapping == NULL) {
-		selToProtocolMapping = PyDict_New();
 		if (selToProtocolMapping == NULL) {
-			Py_DECREF(result);
-			return NULL;
+			selToProtocolMapping = PyDict_New();
+			if (selToProtocolMapping == NULL) {
+				Py_DECREF(result);
+				return NULL;
+			}
 		}
-	}
-	for (i = 0; i < len; i++) {
-		ObjCSelector* tmp =
-			(ObjCSelector*)PyTuple_GET_ITEM(selectors, i);
-		
-		PyDict_SetItemString(selToProtocolMapping,
-			SELNAME(tmp->sel_selector),
-			name);
+		for (i = 0; i < len; i++) {
+			ObjCSelector* tmp =
+				(ObjCSelector*)PyTuple_GET_ITEM(selectors, i);
+			
+			PyDict_SetItemString(selToProtocolMapping,
+				SELNAME(tmp->sel_selector),
+				name);
+		}
 	}
 #endif
 

File pyobjc/Modules/objc/libffi_support.m

 #    error "Need FFI_CLOSURES!"
 #endif
 
+#if 0 /* Usefull during debugging, only used in the debugger */
 static void describe_ffitype(ffi_type* type)
 {
 	switch (type->type) {
 	printf("%s", ">\n");
 }
 
+#endif
+
 static int align(int offset, int alignment)
 {
 	int rest = offset % alignment;
 			}
 
 			v = PyTuple_GET_ITEM(res, idx++);
-			err = depythonify_c_value(argtype, v, args[i]);
+			err = depythonify_c_value(argtype, v, *(void**)args[i]);
 			if (err == -1) {
 				ObjCErr_ToObjC();
 			}
   expire as soon as the last reference from Python died, *not* when the 
   Objective-C object died.
 
+- We now generate warnings if a class implements an informal protocol, but
+  doesn't declare that in its definition.
+
 Version 0.9.1 (May-??-2003):
 
 - Fixed some glitches in the documentation

File pyobjc/Scripts/gen_test_methods.py

         fp.write('set_signature("PyObjC_TestClass1", "%sOutArg:", "v@:o^%s")\n'%(nm, sign))
         fp.write('set_signature("PyObjC_TestClass1", "%sInArg:", "@@:n^%s")\n'%(nm, sign))
 
-        fp.write('set_signature("PyObjC_TestClass2", "call%sInOutArg:", "@@:N^%s")\n'%(nm, sign))
-        fp.write('set_signature("PyObjC_TestClass2", "call%sOutArg:", "v@:o^%s")\n'%(nm, sign))
-        fp.write('set_signature("PyObjC_TestClass2", "call%sInArg:", "@@:n^%s")\n'%(nm, sign))
-        fp.write('set_signature("PyObjC_TestClass2", "invoke%sInOutArg:", "@@:N^%s")\n'%(nm, sign))
-        fp.write('set_signature("PyObjC_TestClass2", "invoke%sOutArg:", "v@:o^%s")\n'%(nm, sign))
-        fp.write('set_signature("PyObjC_TestClass2", "invoke%sInArg:", "@@:n^%s")\n'%(nm, sign))
+        fp.write('set_signature("PyObjC_TestClass2", "call%sInOutArg:of:", "@@:N^%s@")\n'%(nm, sign))
+        fp.write('set_signature("PyObjC_TestClass2", "call%sOutArg:of:", "v@:o^%s@")\n'%(nm, sign))
+        fp.write('set_signature("PyObjC_TestClass2", "call%sInArg:of:", "@@:n^%s@")\n'%(nm, sign))
+        fp.write('set_signature("PyObjC_TestClass2", "invoke%sInOutArg:of:", "@@:N^%s@")\n'%(nm, sign))
+        fp.write('set_signature("PyObjC_TestClass2", "invoke%sOutArg:of:", "v@:o^%s@")\n'%(nm, sign))
+        fp.write('set_signature("PyObjC_TestClass2", "invoke%sInArg:of:", "@@:n^%s@")\n'%(nm, sign))
 
 def emit_py_to_objc(fp):
     fp.write('class PyToObjC (unittest.TestCase):\n')