1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 20:06:38 +02:00

core: add configuration version, add API function config_set_version

This commit is contained in:
Sébastien Helleu
2023-02-21 07:06:01 +01:00
parent 7b8e5b36c0
commit 66571a0b63
27 changed files with 1792 additions and 41 deletions
+8
View File
@@ -151,6 +151,11 @@ def config_reload_cb(data, config_file):
return weechat.WEECHAT_RC_OK
def config_update_cb(data, config_file, version, data_read):
"""Config update callback."""
return weechat.WEECHAT_RC_OK
def section_read_cb(data, config_file, section, option_name, value):
"""Section read callback."""
return weechat.WEECHAT_RC_OK
@@ -199,6 +204,9 @@ def test_config():
'config_reload_cb', 'config_reload_data',
)
check(ptr_config != '')
# set version
weechat.config_set_version(ptr_config, 2,
'config_update_cb', 'config_update_data')
# section
ptr_section = weechat.config_new_section(
ptr_config, 'section1', 0, 0,