swig/Lib/php
William S Fulton a1e619b7cb argcargv / OOM-protection follow-ups
- [Lua] Fix off-by-one when nil terminates the table early: use $1 = i
  (not i + 1) to match the count of strings actually copied, and pop
  the nil from the Lua stack before breaking.

- [Python] In SWIG_AsCharPtrAndSize (pystrings.swg) decref bytes / obj
  on the SWIG_MemoryError early returns added by the previous commits,
  so an allocation failure no longer leaks the temporary PyObject.

- [Octave, Python] In argcargv.i free already-allocated string entries
  and the array itself before failing on a per-element OOM (Python uses
  the existing break path so the freearg typemap performs the cleanup).

- [Perl, PHP, Tcl] Drop unreachable `goto fail` after SWIG_croak /
  SWIG_PHP_Error / SWIG_exception_fail, all of which already invoke
  SWIG_fail. Compilers warning on unreachable code complained.

- Standardise the OOM error wording across languages and fix the
  3- and 5-space indentation introduced by the previous commits.

- Update Examples/perl5/xmlstring/xmlstring.i to the new
  %typemaps_string signature (it picks up the missing WarningLeakMsg
  argument too) and add a SWIG_NewCopyXMLChArray fragment.

- CHANGES.current: document the API breakages introduced by removing
  %new_copy_array, removing %typemaps_string_alloc and extending
  %typemaps_string, including the actual error text users will see.

Assisted-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 21:01:30 +01:00
..
argcargv.i argcargv / OOM-protection follow-ups 2026-05-19 21:01:30 +01:00
cdata.i cdata whitespace/cosmetic fixups 2024-06-13 10:48:15 +01:00
const.i Remove support for PHP7 2023-04-14 17:38:01 +12:00
director.swg Use SWIG_NOEXCEPT for deprecated dynamic exception specifications 2025-04-29 22:41:09 +01:00
factory.i [php] Generate PHP type declarations 2022-01-20 10:07:44 +13:00
php.swg string-length typemaps typecheck 2025-08-11 08:28:02 +01:00
phpinit.swg [php] Fix testcase segfaults with PHP 8.0 2022-09-29 13:13:52 +13:00
phpinterfaces.i Remove remaining traces of PHP7 support 2023-04-20 13:45:30 +12:00
phpkw.swg Renames performed by `%namewarn` with `rename=` are printed in warning message 2022-02-06 13:51:37 -05:00
phppointers.i [php] Generate PHP type declarations 2022-01-20 10:07:44 +13:00
phprun.swg PHP: Fix -Wunused warnings for unused helper functions 2025-11-06 07:25:54 +13:00
std_auto_ptr.i Add missing typecheck typemaps for std::auto_ptr and std::unique_ptr 2022-09-17 10:23:51 +01:00
std_common.i php: Trim trailing whitespace from PHP typemaps 2021-03-26 10:19:57 +13:00
std_deque.i WARN_* constants are user visible, so keep existing WARN_PHP4_* for 2008-07-03 00:09:56 +00:00
std_map.i Remove deprecated map and vector specialisation macros 2023-12-03 09:55:35 +13:00
std_pair.i Consistent parameter names for std::pair 2019-02-14 22:44:27 +00:00
std_string.i Move SWIG_Php_AppendOutput out of the t_output_helper to the runtime 2024-10-06 20:34:05 +01:00
std_string_view.i Sort out directorout typemaps for std::string_view 2023-12-21 10:59:44 +13:00
std_unique_ptr.i Add const std::unique_ptr & input typemaps 2024-03-06 21:46:58 +00:00
std_vector.i php: Trim trailing whitespace from PHP typemaps 2021-03-26 10:19:57 +13:00
stl.i php: Trim trailing whitespace from PHP typemaps 2021-03-26 10:19:57 +13:00
swigmove.i Add missing SWIGTYPE MOVE typecheck typemaps 2024-03-07 08:28:06 +00:00
typemaps.i Move SWIG_Php_AppendOutput out of the t_output_helper to the runtime 2024-10-06 20:34:05 +01:00
utils.i Add note as to when t_output_helper was deprecated 2024-10-08 07:43:42 +13:00