Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: 8e916e2da49b0112fbf2629de82d28f1106d116a https://github.com/Perl/perl5/commit/8e916e2da49b0112fbf2629de82d28f1106d116a Author: Paul "LeoNerd" Evans <leon...@leonerd.org.uk> Date: 2024-07-24 (Wed, 24 Jul 2024)
Changed paths: M pad.c Log Message: ----------- pad.c: Ensure SvTYPE(cvbody) == SVt_PVCV during destruction to keep asserts happy Commit: 6951448cba147cb7162bdb65373828f5745b1b45 https://github.com/Perl/perl5/commit/6951448cba147cb7162bdb65373828f5745b1b45 Author: Paul "LeoNerd" Evans <leon...@leonerd.org.uk> Date: 2024-07-24 (Wed, 24 Jul 2024) Changed paths: M regen/embed.pl Log Message: ----------- regen/embed.pl: minor refactor of code that generates args assert macros Commit: 8a3f7de4fca3ce5f371b0ce9da80430697b68840 https://github.com/Perl/perl5/commit/8a3f7de4fca3ce5f371b0ce9da80430697b68840 Author: Paul "LeoNerd" Evans <leon...@leonerd.org.uk> Date: 2024-07-24 (Wed, 24 Jul 2024) Changed paths: M proto.h M regen/embed.pl Log Message: ----------- regen/embed.pl: better line-wrapping of args assert macros Commit: 2463f19365f941f68e9d5eed2f787341df8ccdef https://github.com/Perl/perl5/commit/2463f19365f941f68e9d5eed2f787341df8ccdef Author: Paul "LeoNerd" Evans <leon...@leonerd.org.uk> Date: 2024-07-24 (Wed, 24 Jul 2024) Changed paths: M embed.fnc M proto.h M regen/embed.pl Log Message: ----------- Put SvTYPE() asserts in args check macros By default, any argument to a function whose type is AV *, CV * or HV * will have an SvTYPE() check added to its PERL_ARGS_ASSERT_... macro. This helps catch errors of mismatched structure types being passed to API functions. AV and HV checks are simple. CV checks must check for both SVt_PVCV and SVt_PVFM, because of forms. Currently we do not implement checks on GVs because so many of the GV-related functions are sometimes used when the "gv" pointer does not in fact point at a valid GV instance. Arguments to a number of the functions have been marked with a "NOCHECK" tag, which disables the type checking on that argument. These are for similar reasons to GVs; functions which permit pointers to be passed that don't in fact point at the type of structure the pointer argument would suggest. It may be an ongoing task to tidy up some of these usecases (if internal), or to either change the external-facing APIs, or define new "union types" of pointer to better indicate the nature of allowed values for the remaining functions. Compare: https://github.com/Perl/perl5/compare/6483534c5e13...2463f19365f9 To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications