Help for this page

Select Code to Download


  1. or download this
    typedef struct _mystruct1 {
        int val;
    ...
        mystruct *ptr;
    } mystruct2;
    
  2. or download this
    mystruct2 *mine;
    int res;
    ...
    
    mine->ptr->val = 100;
    res = mine->ptr->init(object1, object2);
    
  3. or download this
    print "$mine->{"ptr"}->{"val"}";            # This seems to work
    $mine->{"ptr"}->{"init"}(object1, object2); # This does not work
    
  4. or download this
    rh = (HV *)sv_2mortal((SV *)newHV());
    hv_store(rh, "val", 3, newSViv(mine->ptr->val), 0);
    hv_store(rh, "init", 4, newRV((SV *)mine->ptr->init), 0); # This line 
    +did not work
    
  5. or download this
    if (SvROK ((SV *) mine->ptr->init)) {
        type = SvTYPE(SvRV((SV *)mine->ptr->init));
        printf ("Something ..%d", type);
    }