com php/gtk-src: This officially breaks building with anything less then 5.3 with the generator since it uses closures: generator/array _printf.php
[email protected] (Elizabeth Marie Smith) Thu, 09 Aug 2012 03:07:37 +0000
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 4cda109cf9fbc3498df709a0cf009da93919439e=0AAuthor: Elizabeth = M Smith <[email protected]> Wed, 8 Aug 2012 23:07:37 -0400=0A= Parents: c3eded3df0c68c1700652204afc726d8425bd7d6=0ABranches: master=0A= =0ALink: http://git.php.net/?p=3Dphp/gtk-src.git;a=3Dcommitdiff;h=3D4= cda109cf9fbc3498df709a0cf009da93919439e=0A=0ALog:=0AThis officially breaks = building with anything less then 5.3=0Awith the generator since it uses clo= sures=0A=0ABut I can't get rid the of the /e modifier in the regex=0Awithou= t using a closure to wrap up that array information=0Aso I'm stuck - either= I break the generator for 5.2=0Aor it spews on 5.4=0A=0ANote this doesn't = mean you can't still build against 5.2=0Ayou just need php 5.3 cli or highe= r to do the build=0A=0AChanged paths:=0A M generator/array_printf.php=0A= =0A=0ADiff:=0Adiff --git a/generator/array_printf.php b/generator/array_pri= ntf.php=0Aindex a8d6473..cf84ba7 100644=0A--- a/generator/array_printf.php= =0A+++ b/generator/array_printf.php=0A@@ -5,7 +5,12 @@ function aprintf($tm= pl, $array)=0A =09$array =3D (array)$array;=0A =09if (count($array) < 1) re= turn $tmpl;=0A =0A-=09return preg_replace('!%\((\w+)\)!e', 'isset(\$array["= $1"]) ? \$array["$1"] : ""', $tmpl);=0A-}=0A+=09$callback =3D=0A+=09=09func= tion ($matches) use ($array)=0A+=09=09{=0A+=09=09=09return isset($array[$ma= tches[1]]) ? $array[$matches[1]] : "";=0A+=09=09};=0A =0A-?>=0A+=09return p= reg_replace_callback('!%\((\w+)\)!', $callback, $tmpl);=0A+}=0A+?>=0A\ No n= ewline at end of file=0A