Skip to content

PawnPlus v1.4

Compare
Choose a tag to compare
@IS4Code IS4Code released this 10 Oct 11:21
· 148 commits to master since this release

Additions

  • Added the possibility to register and handle a custom format selector, including the str_register_format and str_get_format_tag functions and the tag_op_format tag operation. More here.
  • str_val_* functions have a new format string parameter to use the format operation instead of string conversion. The value corresponds to a format specifier in str_format.
  • An expression (in {, }) in str_format may be followed by a format specifier like an argument substitution.
  • Added tag_set_op_expr to allow handling a tag operation with an expression.
  • Added regex_start_at_pos to treat the pos argument as an absolute start of the string (for ^).
  • All families of functions that accept variant parameters now also accept dynamic strings natively.
  • Added pp_daytime to obtain the time of day in milliseconds.

Changes

  • The d format selector does not necessarily imply signed integer conversion when applied on tagged values, only "decimal", meaning it can be used on Float: and unsigned:.
  • str_format and similar functions treat a sole "%s" format string specially and do not use a tag operation, primarily to speed-up the case of appending a single string via str_append_format.
  • Functions that do not return a meaningful value are marked with unit: in the include. This does not denote an actual tag, only that the function always returns 1 (or raises an error on failure).
  • task_set_error raises an error when used with a non-error code.
  • var_delete raises an error when used on an invalid variant reference.
  • The debug module on Windows now also hooks CreateFileW in addition to CreateFileA to accomodate for different host environments. It is now also restricted to .amx files. This could affect plugins that use CreateFileA to open a file, then close the file and expect the file to be immediately available with CreateFileW again, or that use CreateFileW to open a file, close it and then try to open it in another thread. The lifetime of all prolonged handles still ends with the next tick, and now also when an AMX is fully loaded.

Fixes

  • ConstStringTag: is used instead of StringTag: in a couple of places.
  • Fixed assertion error on an invalid format specifier.
  • Clearing containers properly invalidates their iterators.
  • Fixed a crash on exit related to unsetting the locale.
  • Fixed assertion error when regex_cached_addr is used on a dynamic string.
  • Added missing tag_uid_amx_guard to the include.
  • tag_call_op now also supports tag_op_handle.
  • iter_set_* is now regarded as cell-returning in metadata.
  • Fixed a potential memory leak on amx_commit (thanks @GermanAizek).