You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ language runtime. The main focus is on user-observable behavior of the engine.
15
15
* Raise `KeyboardInterrupt` exception when the process is interrupted. Enabled only when using the launcher.
16
16
* Add option `python.InitialLocale` to change the default locale. If not set, then Java Locale#getDefault is used.
17
17
*`multiprocessing` module now uses the `spawn` method (creates new processes) by default. The formerly default method that uses threads and multiple Truffle contexts can be selected using `multiprocessing.set_start_method('graalpy')`.
18
+
*`polyglot` module: add API to redefine Truffle interop messages for external / user defined types. For more details see [The Truffle Interoperability Extension API](docs/user/Interoperability.md).
18
19
19
20
## Version 23.1.0
20
21
* Oracle GraalPy distributions (previously known as GraalPy Enterprise) are now available under the [GFTC license](https://www.oracle.com/downloads/licenses/graal-free-license.html). The community builds published on Github have been renamed to `graalpy-community-<version>-<os>-<arch>.tar.gz`.
| register_interop_behavior | Takes the receiver **type** as first argument. The remainder keyword arguments correspond to the respective Truffle Interop messages. Not All interop messages are supported. |
275
+
| get_registered_interop_behavior | Takes the receiver **type** as first argument. Returns the list of extended Truffle Interop messages for the given type. |
276
+
277
+
#### Supported messages
278
+
279
+
The majority (with some exceptions) of the Truffle Interop messages are supported by the interop behavior extension API, as seen in the table below.
280
+
The naming convention for the `register_interop_behavior` keyword arguments follows the _snake_case_ naming convention, i.e.: the Truffle Interop `fitsInLong` message
281
+
becomes `fits_in_long` and so on. Each message can be extended with a **pure python function** (default keyword arguments, free vars and cell vars are not allowed) or a **boolean constant**.
282
+
Following is the list of currently supported interop messages:
283
+
284
+
| Truffle Message | Extension argument name | Expected return type |
0 commit comments