1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 00:33:13 +02:00

api: change type of argument object_id in upgrade_new callback from string to integer (in scripts)

This commit is contained in:
Sébastien Helleu
2022-09-29 21:38:04 +02:00
parent b2b110f1a3
commit 92cdcee8f6
9 changed files with 37 additions and 35 deletions
+15
View File
@@ -20,6 +20,21 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
[[v3.7]]
== Version 3.7 (under dev)
[[v3.7_upgrade_new_callback_object_id]]
=== Argument "object_id" in callback of upgrade_new
In all script languages (except PHP), the argument "object_id" sent to the
callback of "upgrade_new" is now an integer (it was a string in older releases).
To be compatible with all versions, it is recommended to convert the argument
to integer before testing it, for example in Python:
[source,python]
----
if int(object_id) == 1:
# ...
----
[[v3.7_hook_timer_callback_remaining_calls]]
=== Argument "remaining_calls" in callback of hook_timer