Releases: IS4Code/PawnPlus
Releases · IS4Code/PawnPlus
Release list
PawnPlus v0.7
- Variants can store 2D and 3D arrays now. Many variant functions were updated to work with a variable number of indices.
amx_forkcan specify 3 levels of forking (exec, data, script).- Native hooks are called filters now, both functions merged to
pawn_native_filter. - Obtaining the tag of a variant can be done via
var_tag_uid, removing the need to usetagof. - Optional syntax features are now disabled by default. Define
PP_SYNTAXto restore them. - Compatible with YSI by default.
PawnPlus v0.6
- Added various
*_clonefunctions for deep-cloning objects. - Memory leak fixes related to objects and threads.
- Massive infrastructure change in the various components of the plugin, leading to more manageable and safe code.
- Changes to the tasks API, its garbage collection and adding
task_delete,task_valid,task_completed,task_keep,task_reset,task_any, andtask_all. - Time-based tasks are stored in a list ordered by the time, making the server more efficient in case of a larger number of active timers.
- Numerous functions related to AMX machines like forking, remote access to variables etc. Usable in other systems like tasks and threading.
PawnPlus v0.5
- Added a couple of functions related to tags (name, unique id, inheritance).
- New functions to construct lists and maps from arguments or array of elements.
pawn_call_nativedoesn't require the function to be used in the script.list_delete_deepandmap_delete_deep- deletes their contents too (inner maps, lists, variants, strings).- New technique called guards - automatically freeing an object (list/map) when out of scope.
- Hooking natives. Pre-hooks and post-hooks only (not recursive). Modifying parameters or the return value is possible.
str_splitandstr_join.- Lots of sanity checks for strings, variants, lists, and maps for invalid pointers.
- Naming changes -
*_is_validis now*_valid. Iterator functions renamed tolist_iter_validandmap_iter_valid. - Several
pp_debugging functions for retrieving sizes of various pools (strings, lists etc.) Useful for debugging memory leaks.
PawnPlus v0.4
- Added dynamic containers: variants, lists, and maps. Can be used to store a value of any tag, or limited to a single tag in a generic fashion.
- Introduced customisable meta-tag AnyTag, matching a value of an arbitrary tag.
- Added
pawn_call_publicand extendedpawn_call_nativewith new specifiers for lists, variants, and strings.
PawnPlus v0.3
- More sanity checks related to threads and pausing functions. Many of them no longer rely on the context.
- Fixed a stability issue related to awaiting a task in a continuation.
PawnPlus v0.3-pre3
Synchronising behaviour for threads can be set in thread_detach (or threaded), replacing the original bool parameter:
sync_explicit: native functions are executed in the new thread and all callbacks have to wait until either the thread ends orthread_syncis called.sync_auto: the same applies, but every native function is executed synchronously with the main thread. Callbacks go through when this happens.sync_interrupt: if any callback is to be executed, the thread is paused and waits until the callback finishes (dangerous).
Note that interrupting functions which have side effects can cause race conditions, or worse freeze the server.
Threads can be created now from a task continuation. However, the two systems still aren't compatible (and they aren't going to be).
Debugging or otherwise useful functions like thread_sleep and thread_id were implemented.
PawnPlus v0.3-pre2
- Threaded blocks should now work properly.
- Added thread_sync to execute pending calls to the AMX machine (the thread is not yet paused).
threaded()pseudo-statement for automatic calls to thread_detach/thread_attach.
PawnPlus v0.3-pre1
Use thread_detach(); to start executing code in a separate thread (parallel to the SA-MP server). Use thread_attach(); to revert.
By default, calls to any natives will happen synchronously. Use thread_detach(false); to disable this behaviour (faster code but possible race conditions).
PawnPlus v0.2
- Added functions like str_buf_addr and str_new_buf to allow using dynamic strings as output buffers to functions like GetPlayerName.
- String arguments in native variadic functions are no longer checked by default for performance reasons. Use pp_hook_check_ref_args to enable it.
- Implemented str_format supporting full range of standard format specifiers, and
%S,%Q, and%oin addition. - str_set_format can be used to set the output string instead of creating a new one.
- str_equal complementary to str_cmp (used directly by
==). - Various other bugfixes and improvements.
PawnPlus v0.1.2
- Changed the definitions for
awaitandasyncto remove the need to use parentheses in a statement-like syntax. - Fixed indeterminate values in new task instances.