… | |
… | |
35 | |
35 | |
36 | // same here, massive symbol spamming |
36 | // same here, massive symbol spamming |
37 | #undef do_open |
37 | #undef do_open |
38 | #undef do_close |
38 | #undef do_close |
39 | #undef ref |
39 | #undef ref |
|
|
40 | #undef seed |
40 | |
41 | |
41 | // perl bug #40256: perl does overwrite those with reentrant versions |
42 | // perl bug #40256: perl does overwrite those with reentrant versions |
42 | // but does not initialise their state structures. |
43 | // but does not initialise their state structures. |
43 | #undef random |
44 | #undef random |
44 | #undef crypt |
45 | #undef crypt |
… | |
… | |
247 | } |
248 | } |
248 | |
249 | |
249 | *p = '\n'; |
250 | *p = '\n'; |
250 | } |
251 | } |
251 | |
252 | |
252 | void put (keyword k, const char *v) |
253 | void put (keyword k, const char *v = 0) |
253 | { |
254 | { |
254 | put_string (k, v); |
255 | put_string (k, v); |
255 | } |
256 | } |
256 | |
257 | |
257 | void put (keyword k, const shstr &v) |
258 | void put (keyword k, const shstr &v) |
… | |
… | |
383 | struct coroapi { |
384 | struct coroapi { |
384 | static struct CoroAPI *GCoroAPI; |
385 | static struct CoroAPI *GCoroAPI; |
385 | |
386 | |
386 | static int nready () { return CORO_NREADY; } |
387 | static int nready () { return CORO_NREADY; } |
387 | static int cede () { return CORO_CEDE ; } |
388 | static int cede () { return CORO_CEDE ; } |
|
|
389 | |
|
|
390 | static int cede_counter; |
|
|
391 | |
|
|
392 | static void cede_every (int count) |
|
|
393 | { |
|
|
394 | if (++cede_counter >= count) |
|
|
395 | { |
|
|
396 | cede_counter = 0; |
|
|
397 | |
|
|
398 | if (coroapi::nready ()) |
|
|
399 | coroapi::cede (); |
|
|
400 | } |
|
|
401 | } |
388 | }; |
402 | }; |
389 | |
403 | |
390 | struct watcher_base |
404 | struct watcher_base |
391 | { |
405 | { |
392 | static struct EventAPI *GEventAPI; |
406 | static struct EventAPI *GEventAPI; |