Lib/php/std_string_view.i: Tweak order of typemaps
It seems more logical to have both the `in` typemaps together.
diff --git a/Lib/php/std_string_view.i b/Lib/php/std_string_view.i
index 7f53f9e..903b7e5 100644
--- a/Lib/php/std_string_view.i
+++ b/Lib/php/std_string_view.i
@@ -25,6 +25,12 @@
$1 = std::string_view(Z_STRVAL($input), Z_STRLEN($input));
%}
+ %typemap(in, phptype="string") const string_view& ($*1_ltype temp) %{
+ convert_to_string(&$input);
+ temp = std::string_view(Z_STRVAL($input), Z_STRLEN($input));
+ $1 = &temp;
+ %}
+
%typemap(directorout) string_view %{
convert_to_string($input);
$result = std::string_view(Z_STRVAL_P($input), Z_STRLEN_P($input));
@@ -60,10 +66,4 @@
}
%}
- %typemap(in, phptype="string") const string_view& ($*1_ltype temp) %{
- convert_to_string(&$input);
- temp = std::string_view(Z_STRVAL($input), Z_STRLEN($input));
- $1 = &temp;
- %}
-
}