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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user