Commit 9a7559f
committed
Expose some short form macros unconditionally
Until C99 we couldn't use the type of macro we have that hides the need
for thread context to call a function that needed both a thread context
parameter and a format with varying numbers of parameters. Therefore
you had to call the function directly with aTHX_. For some such
functions, there were parallel functions created that omitted the thread
context parameter (re-deriving it themselves). And there were
compatibility macros created that called these. So, for example warn()
would call Perl_warn_nocontext().
That changed in C99, and the calls in core to such functions were
changed to use the macro that now expanded to Perl_warn().
Not all functions with this problem had '_nocontext()' versions. It
turns out that the way the macros were #defined in embed.h, a definition
existed for core, and non-threaded builds, but not threaded ones. This
meant that, likely unknown to you, if you wrote an XS module, and used
one of those macros, such as ck_warner(), it would compile and run on
a non-threaded system, but would not compile on a threaded build.
Commits 13e5ba4 and
d933027 did not affect the
'_nocontext()' versions. This commit exposes their macros to the
public. There is no need to worry about breaking existing code, as
these macros existed only on non-threaded builds, and they still work
there. They now work on threaded builds as well, as long as you have an
aTHX variable available. This is no different than any newly created
macro for which we are also requiring aTHX availability.1 parent 8914207 commit 9a7559f
2 files changed
+28
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | | - | |
| 878 | + | |
879 | 879 | | |
880 | 880 | | |
881 | | - | |
| 881 | + | |
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
| |||
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
931 | | - | |
| 931 | + | |
932 | 932 | | |
933 | 933 | | |
934 | 934 | | |
| |||
1179 | 1179 | | |
1180 | 1180 | | |
1181 | 1181 | | |
1182 | | - | |
| 1182 | + | |
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
| |||
1210 | 1210 | | |
1211 | 1211 | | |
1212 | 1212 | | |
1213 | | - | |
| 1213 | + | |
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
| |||
1942 | 1942 | | |
1943 | 1943 | | |
1944 | 1944 | | |
1945 | | - | |
| 1945 | + | |
1946 | 1946 | | |
1947 | 1947 | | |
1948 | 1948 | | |
| |||
2141 | 2141 | | |
2142 | 2142 | | |
2143 | 2143 | | |
2144 | | - | |
| 2144 | + | |
2145 | 2145 | | |
2146 | 2146 | | |
2147 | 2147 | | |
| |||
2419 | 2419 | | |
2420 | 2420 | | |
2421 | 2421 | | |
2422 | | - | |
| 2422 | + | |
2423 | 2423 | | |
2424 | 2424 | | |
2425 | 2425 | | |
| |||
2620 | 2620 | | |
2621 | 2621 | | |
2622 | 2622 | | |
2623 | | - | |
| 2623 | + | |
2624 | 2624 | | |
2625 | 2625 | | |
2626 | 2626 | | |
| |||
2691 | 2691 | | |
2692 | 2692 | | |
2693 | 2693 | | |
2694 | | - | |
| 2694 | + | |
2695 | 2695 | | |
2696 | 2696 | | |
2697 | 2697 | | |
| |||
3642 | 3642 | | |
3643 | 3643 | | |
3644 | 3644 | | |
3645 | | - | |
| 3645 | + | |
3646 | 3646 | | |
3647 | 3647 | | |
3648 | 3648 | | |
| |||
3974 | 3974 | | |
3975 | 3975 | | |
3976 | 3976 | | |
3977 | | - | |
| 3977 | + | |
3978 | 3978 | | |
3979 | 3979 | | |
3980 | 3980 | | |
| |||
5472 | 5472 | | |
5473 | 5473 | | |
5474 | 5474 | | |
5475 | | - | |
| 5475 | + | |
5476 | 5476 | | |
5477 | 5477 | | |
5478 | 5478 | | |
| |||
5821 | 5821 | | |
5822 | 5822 | | |
5823 | 5823 | | |
5824 | | - | |
| 5824 | + | |
5825 | 5825 | | |
5826 | 5826 | | |
5827 | 5827 | | |
| |||
5864 | 5864 | | |
5865 | 5865 | | |
5866 | 5866 | | |
5867 | | - | |
| 5867 | + | |
5868 | 5868 | | |
5869 | 5869 | | |
5870 | | - | |
| 5870 | + | |
5871 | 5871 | | |
5872 | 5872 | | |
5873 | 5873 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| |||
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| 227 | + | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| 234 | + | |
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
| |||
907 | 911 | | |
908 | 912 | | |
909 | 913 | | |
910 | | - | |
911 | | - | |
912 | 914 | | |
913 | 915 | | |
914 | 916 | | |
915 | | - | |
916 | | - | |
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
| 1179 | + | |
1179 | 1180 | | |
1180 | 1181 | | |
1181 | 1182 | | |
| |||
1232 | 1233 | | |
1233 | 1234 | | |
1234 | 1235 | | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
1242 | 1236 | | |
1243 | 1237 | | |
1244 | 1238 | | |
| |||
1660 | 1654 | | |
1661 | 1655 | | |
1662 | 1656 | | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
1663 | 1660 | | |
1664 | 1661 | | |
1665 | 1662 | | |
| |||
2067 | 2064 | | |
2068 | 2065 | | |
2069 | 2066 | | |
2070 | | - | |
2071 | | - | |
2072 | | - | |
2073 | | - | |
| 2067 | + | |
2074 | 2068 | | |
2075 | 2069 | | |
2076 | 2070 | | |
| |||
2108 | 2102 | | |
2109 | 2103 | | |
2110 | 2104 | | |
| 2105 | + | |
| 2106 | + | |
2111 | 2107 | | |
2112 | | - | |
2113 | | - | |
2114 | | - | |
2115 | | - | |
2116 | | - | |
2117 | | - | |
2118 | | - | |
| 2108 | + | |
2119 | 2109 | | |
2120 | 2110 | | |
2121 | 2111 | | |
| |||
0 commit comments