Skip to content

Commit

Permalink
Fix #512: Bad metadata for two delegate methods in the WebKit bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldoussoren committed Nov 16, 2022
1 parent cf9cc1b commit 42ce8ea
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
7 changes: 7 additions & 0 deletions docs/changelog.rst
Expand Up @@ -3,6 +3,13 @@ What's new in PyObjC

An overview of the relevant changes in new, and older, releases.

Version 9.0.1
-------------

* #512: Fix metadata for ``webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:`` and
``webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:`` in the WebKit
bindings.

Version 9.0
-----------

Expand Down
3 changes: 2 additions & 1 deletion pyobjc-framework-WebKit/Lib/JavaScriptCore/_metadata.py
@@ -1,6 +1,6 @@
# This file is generated by objective.metadata
#
# Last update: Sun Feb 20 19:31:42 2022
# Last update: Wed Nov 16 11:17:31 2022
#
# flake8: noqa

Expand Down Expand Up @@ -34,6 +34,7 @@ def selAorI(a, b):
enums = """$JSC_OBJC_API_ENABLED@1$WEBKIT_VERSION_1_0@256$WEBKIT_VERSION_1_1@272$WEBKIT_VERSION_1_2@288$WEBKIT_VERSION_1_3@304$WEBKIT_VERSION_2_0@512$WEBKIT_VERSION_3_0@768$WEBKIT_VERSION_3_1@784$WEBKIT_VERSION_4_0@1024$WEBKIT_VERSION_LATEST@39321$kJSClassAttributeNoAutomaticPrototype@2$kJSClassAttributeNone@0$kJSPropertyAttributeDontDelete@8$kJSPropertyAttributeDontEnum@4$kJSPropertyAttributeNone@0$kJSPropertyAttributeReadOnly@2$kJSTypeBoolean@2$kJSTypeNull@1$kJSTypeNumber@3$kJSTypeObject@5$kJSTypeString@4$kJSTypeSymbol@6$kJSTypeUndefined@0$kJSTypedArrayTypeArrayBuffer@9$kJSTypedArrayTypeBigInt64Array@11$kJSTypedArrayTypeBigUint64Array@12$kJSTypedArrayTypeFloat32Array@7$kJSTypedArrayTypeFloat64Array@8$kJSTypedArrayTypeInt16Array@1$kJSTypedArrayTypeInt32Array@2$kJSTypedArrayTypeInt8Array@0$kJSTypedArrayTypeNone@10$kJSTypedArrayTypeUint16Array@5$kJSTypedArrayTypeUint32Array@6$kJSTypedArrayTypeUint8Array@3$kJSTypedArrayTypeUint8ClampedArray@4$"""
misc.update({})
misc.update({})
misc.update({})
functions = {
"JSObjectSetPropertyForKey": (
b"v^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSValue=}^{OpaqueJSValue=}I^^{OpaqueJSValue=}",
Expand Down
9 changes: 3 additions & 6 deletions pyobjc-framework-WebKit/Lib/WebKit/_metadata.py
@@ -1,6 +1,6 @@
# This file is generated by objective.metadata
#
# Last update: Fri Aug 12 15:17:41 2022
# Last update: Wed Nov 16 11:17:30 2022
#
# flake8: noqa

Expand Down Expand Up @@ -927,10 +927,7 @@ def selAorI(a, b):
4: {
"callable": {
"retval": {"type": b"v"},
"arguments": {
0: {"type": b"^v"},
1: {"type": sel32or64(b"i", b"q")},
},
"arguments": {0: {"type": b"^v"}, 1: {"type": b"@"}},
},
"type": "@?",
},
Expand Down Expand Up @@ -1540,7 +1537,7 @@ def selAorI(a, b):
5: {
"callable": {
"retval": {"type": b"v"},
"arguments": {0: {"type": b"^v"}},
"arguments": {0: {"type": b"^v"}, 1: {"type": b"Z"}},
},
"type": "@?",
},
Expand Down
9 changes: 2 additions & 7 deletions pyobjc-framework-WebKit/PyObjCTest/test_wkuidelegate.py
Expand Up @@ -48,11 +48,6 @@ def test_enum_types(self):
def testProtocols10_10(self):
self.assertProtocolExists("WKUIDelegate")

self.assertArgIsBlock(
TestWKUIDelegateHelper.webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_completionHandler_, # noqa: B950
3,
b"v",
)
self.assertArgIsBlock(
TestWKUIDelegateHelper.webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_completionHandler_, # noqa: B950
3,
Expand All @@ -61,12 +56,12 @@ def testProtocols10_10(self):
self.assertArgIsBlock(
TestWKUIDelegateHelper.webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_completionHandler_, # noqa: B950
3,
b"v",
b"vZ",
)
self.assertArgIsBlock(
TestWKUIDelegateHelper.webView_runJavaScriptTextInputPanelWithPrompt_defaultText_initiatedByFrame_completionHandler_, # noqa: B950
4,
b"v",
b"v@",
)
self.assertArgIsBlock(
TestWKUIDelegateHelper.webView_runOpenPanelWithParameters_initiatedByFrame_completionHandler_, # noqa: B950
Expand Down
8 changes: 4 additions & 4 deletions pyobjc-framework-WebKit/metadata/WebKit.fwinfo
Expand Up @@ -1707,10 +1707,7 @@
"typestr": "^v"
},
"1": {
"typestr": [
"i",
"q"
]
"typestr": "@"
}
},
"retval": {
Expand Down Expand Up @@ -1802,6 +1799,9 @@
"arguments": {
"0": {
"typestr": "^v"
},
"1": {
"typestr": "Z"
}
},
"retval": {
Expand Down

0 comments on commit 42ce8ea

Please sign in to comment.