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

Comparing Coro/Coro/CoroAPI.h (file contents):
Revision 1.4 by root, Tue Nov 27 02:51:03 2001 UTC vs.
Revision 1.6 by root, Sat Aug 20 00:49:42 2005 UTC

2#define CORO_API_H 2#define CORO_API_H
3 3
4#include "EXTERN.h" 4#include "EXTERN.h"
5#include "perl.h" 5#include "perl.h"
6#include "XSUB.h" 6#include "XSUB.h"
7
8#ifndef pTHX_
9# define pTHX_
10# define aTHX_
11# define pTHX
12# define aTHX
13#endif
7 14
8/* perl-related */ 15/* perl-related */
9#define TRANSFER_SAVE_DEFAV 0x00000001 /* @_ */ 16#define TRANSFER_SAVE_DEFAV 0x00000001 /* @_ */
10#define TRANSFER_SAVE_DEFSV 0x00000002 /* $_ */ 17#define TRANSFER_SAVE_DEFSV 0x00000002 /* $_ */
11#define TRANSFER_SAVE_ERRSV 0x00000004 /* $@ */ 18#define TRANSFER_SAVE_ERRSV 0x00000004 /* $@ */
40 GV *current; 47 GV *current;
41}; 48};
42 49
43static struct CoroAPI *GCoroAPI; 50static struct CoroAPI *GCoroAPI;
44 51
45#define CORO_TRANSFER(prev,next) GCoroAPI->transfer(aTHX_ (prev),(next)) 52#define CORO_TRANSFER(prev,next,flags) GCoroAPI->transfer(aTHX_ (prev), (next), (flags))
46#define CORO_SCHEDULE GCoroAPI->schedule() 53#define CORO_SCHEDULE GCoroAPI->schedule ()
47#define CORO_CEDE GCoroAPI->cede() 54#define CORO_CEDE GCoroAPI->cede ()
48#define CORO_READY(coro) GCoroAPI->ready(coro) 55#define CORO_READY(coro) GCoroAPI->ready (coro)
49#define CORO_NREADY (*GCoroAPI->nready) 56#define CORO_NREADY (*GCoroAPI->nready)
50#define CORO_CURRENT SvRV(GvSV(GCoroAPI->current)) 57#define CORO_CURRENT SvRV(GvSV(GCoroAPI->current))
51 58
52#define I_CORO_API(YourName) \ 59#define I_CORO_API(YourName) \
53STMT_START { \ 60STMT_START { \

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines