Ignore:
Timestamp:
Aug 19, 2003, 2:11:21 AM (22 years ago)
Author:
bird
Message:

Extended testcase with variable declaration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/testcase/572main.cpp

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r638 r639  
    103103
    104104
     105/*
     106 * Variables
     107 */
     108void    (* _Optlink PVar1Void)(int a, int b, int c, int d);
     109void *  (* _Optlink PVar1PVoid)(int a, int b, int c, int d);
     110int     (* _Optlink PVar1Int)(int a, int b, int c, int d);
     111PTYPE   (* _Optlink PVar1PType)(int a, int b, int c, int d);
     112
     113/* Alternate writing which should have the same effect I think... */
     114void    (_Optlink * PVar2Void)(int a, int b, int c, int d);
     115void *  (_Optlink * PVar2PVoid)(int a, int b, int c, int d);
     116int     (_Optlink * PVar2Int)(int a, int b, int c, int d);
     117PTYPE   (_Optlink * PVar2PType)(int a, int b, int c, int d);
     118
     119
    105120extern "C" int DoC(void);
    106121int main(void)
     
    129144    static PTypedef2PType       pfnPTypedef2PType = PType;
    130145
     146    PVar1Void   = Void;
     147    PVar1PVoid  = PVoid;
     148    PVar1Int    = Int;
     149    PVar1PType  = PType;
     150
     151    PVar2Void   = Void;
     152    PVar2PVoid  = PVoid;
     153    PVar2Int    = Int;
     154    PVar2PType  = PType;
     155
     156
    131157    /* extern functions */
    132158    ExternCVoid(1,2,3,4);
     
    185211    vft.PStructMember2PType(1,2,3,4);
    186212
     213    /* variables */
     214    PVar1Void(1,2,3,4);
     215    PVar1PVoid(1,2,3,4);
     216    PVar1Int(1,2,3,4);
     217    PVar1PType(1,2,3,4);
     218
     219    PVar2Void(1,2,3,4);
     220    PVar2PVoid(1,2,3,4);
     221    PVar2Int(1,2,3,4);
     222    PVar2PType(1,2,3,4);
     223
    187224    /* test C stuff */
    188225    DoC();
Note: See TracChangeset for help on using the changeset viewer.