ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro-Multicore/perlmulticore.h
(Generate patch)

Comparing Coro-Multicore/perlmulticore.h (file contents):
Revision 1.11 by root, Fri Jul 3 02:35:48 2015 UTC vs.
Revision 1.12 by root, Fri Jul 3 02:55:03 2015 UTC

171static void 171static void
172perl_multicore_nop (void) 172perl_multicore_nop (void)
173{ 173{
174} 174}
175 175
176static const char perl_multicore_api_key[] = "perl_multicore_api";
177
176/* this is the initial implementation of "release" - it initialises */ 178/* this is the initial implementation of "release" - it initialises */
177/* the api and then calls the real release function */ 179/* the api and then calls the real release function */
178static void 180static void
179perl_multicore_init (void) 181perl_multicore_init (void)
180{ 182{
181 dTHX; 183 dTHX;
182 184
183 /* check for existing API struct in PL_modglobal */ 185 /* check for existing API struct in PL_modglobal */
184 SV **api_svp = hv_fetch (PL_modglobal, "perl_multicore_api", sizeof ("perl_multicore_api") - 1, 1); 186 SV **api_svp = hv_fetch (PL_modglobal, perl_multicore_api_key,
187 sizeof (perl_multicore_api_key) - 1, 1);
185 188
186 if (SvPOKp (*api_svp)) 189 if (SvPOKp (*api_svp))
187 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 */
188 else 191 else
189 { 192 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines