Commit e561b6e
committed
ParseXS: split out C++ class and const
An XSUB can be a C++ method if its name includes a class; it can also have an optional 'const' postfix modifier; e.g.: int X::Y::foo(...) const Before this commit, both the class of the XSUB and the const modifier were combined into a single string that was used in various places, suvh as to declare the type of the THIS variable, e.g. const X__Y THIS = ...; This commit splits the state into two separate fields during parsing, then these two fields are used later during code generation to Do the Right Thing. So before, the XSUB declaration above would, at parse time, have created an xsub_decl node which looked like: $xsub->{xsub_decl}{class} = 'const X::Y'; and which now looks like: $xsub->{xsub_decl}{class} = 'X::Y'; $xsub->{xsub_decl}{is_const} = TRUE; The three tests added by this commit all failed before this fix.1 parent 43263bc commit e561b6e
File tree
2 files changed
+53
-11
lines changed- dist/ExtUtils-ParseXS
- lib/ExtUtils/ParseXS
- t
2 files changed
+53
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
839 | | - | |
| 839 | + | |
| 840 | + | |
840 | 841 | | |
841 | 842 | | |
842 | 843 | | |
| 844 | + | |
843 | 845 | | |
844 | 846 | | |
845 | 847 | | |
| |||
879 | 881 | | |
880 | 882 | | |
881 | 883 | | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
890 | 887 | | |
891 | 888 | | |
892 | 889 | | |
| |||
906 | 903 | | |
907 | 904 | | |
908 | 905 | | |
| 906 | + | |
909 | 907 | | |
910 | 908 | | |
911 | 909 | | |
| |||
919 | 917 | | |
920 | 918 | | |
921 | 919 | | |
922 | | - | |
| 920 | + | |
| 921 | + | |
923 | 922 | | |
924 | 923 | | |
925 | 924 | | |
| |||
2439 | 2438 | | |
2440 | 2439 | | |
2441 | 2440 | | |
2442 | | - | |
| 2441 | + | |
| 2442 | + | |
2443 | 2443 | | |
2444 | 2444 | | |
2445 | 2445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1212 | 1212 | | |
1213 | 1213 | | |
1214 | 1214 | | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
1215 | 1257 | | |
1216 | 1258 | | |
1217 | 1259 | | |
| |||
0 commit comments