… | |
… | |
135 | =cut |
135 | =cut |
136 | |
136 | |
137 | */ |
137 | */ |
138 | |
138 | |
139 | #define PERL_MULTICORE_MAJOR 1 /* bumped on incompatible changes */ |
139 | #define PERL_MULTICORE_MAJOR 1 /* bumped on incompatible changes */ |
140 | #define PERL_MULTICORE_MINOR 0 /* bumped on every change */ |
140 | #define PERL_MULTICORE_MINOR 1 /* bumped on every change */ |
141 | |
141 | |
142 | #if PERL_MULTICORE_DISABLE |
142 | #if PERL_MULTICORE_DISABLE |
143 | |
143 | |
144 | #define perlinterp_release() do { } while (0) |
144 | #define perlinterp_release() do { } while (0) |
145 | #define perlinterp_acquire() do { } while (0) |
145 | #define perlinterp_acquire() do { } while (0) |
… | |
… | |
189 | if (SvPOKp (*api_svp)) |
189 | if (SvPOKp (*api_svp)) |
190 | perl_multicore_api = (struct perl_multicore_api *)SvPVX (*api_svp); /* we have one, use the existing one */ |
190 | perl_multicore_api = (struct perl_multicore_api *)SvPVX (*api_svp); /* we have one, use the existing one */ |
191 | else |
191 | else |
192 | { |
192 | { |
193 | /* create a new one with a dummy nop implementation */ |
193 | /* create a new one with a dummy nop implementation */ |
|
|
194 | #ifdef NEWSV |
194 | SV *api_sv = NEWSV (0, sizeof (*perl_multicore_api)); |
195 | SV *api_sv = NEWSV (0, sizeof (*perl_multicore_api)); |
|
|
196 | #else |
|
|
197 | SV *api_sv = newSV ( sizeof (*perl_multicore_api)); |
|
|
198 | #endif |
195 | SvCUR_set (api_sv, sizeof (*perl_multicore_api)); |
199 | SvCUR_set (api_sv, sizeof (*perl_multicore_api)); |
196 | SvPOK_only (api_sv); |
200 | SvPOK_only (api_sv); |
197 | perl_multicore_api = (struct perl_multicore_api *)SvPVX (api_sv); |
201 | perl_multicore_api = (struct perl_multicore_api *)SvPVX (api_sv); |
198 | perl_multicore_api->pmapi_release = |
202 | perl_multicore_api->pmapi_release = |
199 | perl_multicore_api->pmapi_acquire = perl_multicore_nop; |
203 | perl_multicore_api->pmapi_acquire = perl_multicore_nop; |
… | |
… | |
207 | END_EXTERN_C |
211 | END_EXTERN_C |
208 | |
212 | |
209 | #endif |
213 | #endif |
210 | |
214 | |
211 | #endif |
215 | #endif |
|
|
216 | |