Trygve Aaberge
197a7a01e4
scripts: allow null values in config_new_option
...
The plugin API function config_new_option accepts null as the
default_value and/or value however the scripting APIs (except for lua)
didn't allow sending null as a parameter value, so it was impossible to
use it this way. This allows sending a null value for these parameters.
Lua already supported sending in nil for these parameters and it works
as expected, so nothing is changed for this plugin.
For Guile you can now send in #nil, for JavaScript null or undefined,
for Perl undef, for PHP NULL, for Python None, for Ruby nil and for Tcl
$::weechat::WEECHAT_NULL.
In all of these languages except Tcl this is the special value
indicating a missing value. However Tcl only has one type, string, so it
doesn't have a null value. Therefore I created a constant with the value
`\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF` which is used
instead. This is very unlikely to appear unintentionally. Using the
unicode code point \uFFFF was suggested on
https://wiki.tcl-lang.org/page/null .
I tested this with these scripts:
https://gist.github.com/trygveaa/f91977dde5d2876d502bf55fbf9b50cc
2022-03-12 16:00:38 +01:00
Sébastien Helleu
9259442dbf
core: add support of date and tags in messages displayed in buffers with free content, add function printf_y_date_tags ( closes #1746 )
2022-01-30 11:41:06 +01:00
Sébastien Helleu
c44b79dce7
core: update copyright dates
2022-01-17 18:41:06 +01:00
Sébastien Helleu
2da2172593
api: add parameters pointers, extra_vars and options in function hdata_search
2021-11-06 15:59:18 +01:00
Adam Saponara
5442612bc9
php: fix PHP 8+ build
2021-08-08 09:00:24 +02:00
Sébastien Helleu
2b12b4077a
php: add detection of PHP 8.0, fix compilation errors
2021-08-08 09:00:24 +02:00
Sébastien Helleu
efc7a588d6
core: update copyright dates
2021-01-02 21:34:16 +01:00
Sébastien Helleu
268aa631c6
api: add function string_color_code_size (issue #1547 )
2020-08-22 08:55:16 +02:00
Sébastien Helleu
b0ecbdbf1d
core: add bar option "color_bg_inactive" (issue #732 )
2020-06-21 18:59:54 +02:00
Sébastien Helleu
88bef0b1b1
core: rename functions hook_completion_{get_string|list_add} to completion_{get_string|list_add}
...
Old functions are kept for compatibility reasons.
2020-05-08 10:51:30 +02:00
Sébastien Helleu
d1a427b67f
api: return integer in function gui_completion_search (issue #1484 )
2020-04-28 10:46:49 +02:00
Sébastien Helleu
d3020976d5
api: add functions completion_new, completion_search and completion_free (issue #1484 )
2020-04-27 22:15:42 +02:00
Sébastien Helleu
feb6258910
core: update copyright dates
2020-01-04 10:41:26 +01:00
Sébastien Helleu
3d95217745
api: return allocated string in hook_info callback and function info_get
2019-04-13 08:42:45 +02:00
Sébastien Helleu
80b980b2af
api: add function command_options (issue #928 )
2019-02-28 20:19:18 +01:00
Sébastien Helleu
64043d5a6c
php: fix memory leak in functions using hashtable parameters
...
Functions fixed in PHP plugin:
- string_eval_expression
- string_eval_path_home
- key_bind
- hook_process_hashtable
- hook_hsignal_send
- info_get_hashtable
- hdata_update
2019-02-27 07:51:02 +01:00
Sébastien Helleu
c2859096cb
api: add function string_match_list
2019-02-27 07:46:22 +01:00
Sébastien Helleu
2b0057239b
core: update copyright dates
2019-01-01 15:40:51 +01:00
Sébastien Helleu
4712d0bb06
core: use https for links to GNU GPL license
2018-11-29 23:16:07 +01:00
Sébastien Helleu
796859b873
core: fix copyright dates
2018-09-01 08:13:12 +02:00
Sébastien Helleu
42be1a74a0
api: add function hook_line
2018-08-12 21:45:00 +02:00
Sébastien Helleu
9265acf879
scripts: fix memory leak in hook_info callback
2018-04-13 19:55:20 +02:00
Sébastien Helleu
41d63511b4
scripts: fix return value of hook_infolist callback (pointer instead of string)
2018-04-12 00:12:20 +02:00
Sébastien Helleu
3467d6eb43
scripts: return long integer instead of string in function infolist_time
2018-04-10 21:26:15 +02:00
Sébastien Helleu
4001ed956f
php: return long instead of int in function hdata_time
2018-04-10 19:34:43 +02:00
Sébastien Helleu
9d83cefdbf
php: fix return code of functions config_write_option and config_write_line
2018-04-10 19:34:31 +02:00
Sébastien Helleu
ab61ddd4ab
scripts: do not allocate memory when converting pointers to strings
2018-04-10 19:33:14 +02:00
Sébastien Helleu
c3d1c9734b
php: fix memory leak in 72 functions returning allocated strings
...
Fixed functions:
- iconv_to_internal
- iconv_from_internal
- string_mask_to_regex
- string_format_size
- string_remove_color
- string_eval_expression
- string_eval_path_home
- list_new
- list_add
- list_search
- list_casesearch
- list_get
- list_next
- list_prev
- config_new
- config_new_section
- config_search_section
- config_new_option
- config_search_option
- config_get
- hook_command
- hook_completion
- hook_command_run
- hook_timer
- hook_fd
- hook_process
- hook_process_hashtable
- hook_connect
- hook_print
- hook_signal
- hook_hsignal
- hook_config
- hook_modifier
- hook_modifier_exec
- hook_info
- hook_info_hashtable
- hook_infolist
- hook_focus
- buffer_new
- buffer_search
- buffer_search_main
- current_buffer
- buffer_get_pointer
- buffer_string_replace_local_var
- current_window
- window_search_with_buffer
- window_get_pointer
- nicklist_add_group
- nicklist_search_group
- nicklist_add_nick
- nicklist_search_nick
- nicklist_group_get_pointer
- nicklist_nick_get_pointer
- bar_item_search
- bar_item_new
- bar_search
- bar_new
- infolist_new
- infolist_new_item
- infolist_new_var_integer
- infolist_new_var_string
- infolist_new_var_pointer
- infolist_new_var_time
- infolist_search_var
- infolist_get
- infolist_pointer
- hdata_get
- hdata_get_list
- hdata_move
- hdata_search
- hdata_pointer
- upgrade_new
2018-04-07 21:52:49 +02:00
Sébastien Helleu
6de98179bc
api: add function string_format_size in scripting API
2018-04-07 13:20:58 +02:00
Sébastien Helleu
db448a3e94
php: add OpenSSL licensing in copyright
2018-01-25 22:31:51 +01:00
Sébastien Helleu
21e63e7958
scripts: add configuration file for each script plugin
2018-01-15 21:57:06 +01:00
Sébastien Helleu
5f7b62f835
php: fix crash in API function string_eval_path_home
2017-09-21 21:01:29 +02:00
Sébastien Helleu
4d75b5b145
php: fix crash in API function string_eval_expression
2017-09-17 17:36:56 +02:00
Sébastien Helleu
24bef50ab2
php: fix function plugin_get_name
2017-09-10 20:51:42 +02:00
Sébastien Helleu
e5acc39770
php: fix arguments of hook_command callback
2017-09-09 15:09:34 +02:00
Sébastien Helleu
1851f6472f
php: rename print functions
...
Rename:
- printf to print
- printf_date_tags to print_date_tags
- printf_y to print_y
- log_printf to log_print
2017-09-07 21:50:20 +02:00
Sébastien Helleu
36a9cffa39
php: check that script is registered in API functions, add macros to return values
2017-09-07 21:33:23 +02:00
Sébastien Helleu
2a04ae0d65
php: rename API callback functions
2017-09-06 20:58:15 +02:00
Sébastien Helleu
48c9fbec35
php: add missing functions current_buffer and current_window
2017-09-06 20:07:26 +02:00
Sébastien Helleu
5bec71f891
php: move macro API_FUNC_INIT, aggregate declaration of variables
2017-09-06 00:26:17 +02:00
Sébastien Helleu
28811c7ebd
php: sort functions by topic, remove unused API functions, fix compiler warning
...
Functions removed (not in scripting API):
- weechat_string_replace
- weechat_hdata_get_var
- weechat_hdata_get_var_type
2017-09-04 21:08:49 +02:00
Sébastien Helleu
43624c6d70
php: add comments in code
2017-09-03 15:34:30 +02:00
Sébastien Helleu
baa1d5fbc9
php: add function "hdata_compare"
2017-09-03 15:34:29 +02:00
Adam Saponara
d032ee2159
php: new php plugin
...
This plugin requires PHP >= 7.0.
2017-09-03 15:33:16 +02:00