Pleas forgive the stupid questions:

But I can't see the problem:
Here's the calling lines from my script:
    my $l1 = 2*$$mingrid[0]/$top_units;
    my $l2 = 2*$$mingrid[1]/$top_units;
    my $l3 = $libcell_db->LayerNumber($textlayer);
warn $l1;
warn $l2;
warn $l3;
    $rectp = Laff::Node->New(lCPR,$l3,$l1,$l2,0,$pts[0],$pts[1]);
warn $rectp;
    $rectp->Parent($libcell_detailp);


Here's from my xs:
MODULE = Laff PACKAGE = Laff::Node PREFIX=Node

Laff::Node
New(class,...)
char* class
CODE:
{
  /* search node new */
  int     ltype,npts,i,type,config,token;
  char    *name,buf[256];
  xy_t    pts[10000];
  int     iary[1000];
  AV*     av;
  node_p  retp;

  if (items EQ 0)
  {
    retp   = NodeMalloc(lNOOP);
    goto END;
  }
fprintf(stderr," #items = '%d'\n",items);
  if (SvTYPE(ST(1)) NE SVt_IV)
  {
    lERROR("Node::New : Arg1 must be one of the data type, (type of node NOOP if 
none)!\n");
    goto END;
  }
  ltype = SvIV(ST(1));
  retp  = NULL;
  switch(ltype)
  {
...
    case lCPR:
        if (items NE 8)
        {
          lERROR("Node::New : CPR : Need layer, length, width, angle, x and y 
coords!\n");
          goto END;
        }
        if (SvTYPE(ST(2)) NE SVt_IV)
        {
          lERROR("Node::New : CPR : Arg 2 must be layer integer!\n");
          goto END;
        }
fprintf(stderr,"ST3 = '%d'\n",ST(3));
        if (SvTYPE(ST(3)) NE SVt_IV)
        {
          lERROR("Node::New : CPR : Arg 3 must be length integer!\n");
          goto END;
        }
        if (SvTYPE(ST(4)) NE SVt_IV)
        {
          lERROR("Node::New : CPR : Arg 4 must be width integer!\n");
          goto END;
        }
        if (SvTYPE(ST(5)) NE SVt_IV)
        {
          lERROR("Node::New : CPR : Arg 5 must be angle integer!\n");
          goto END;
        }
        if (SvTYPE(ST(6)) NE SVt_IV)
        {
          lERROR("Node::New : CPR : Arg 6 must be x coord integer!\n");
          goto END;
        }
        if (SvTYPE(ST(7)) NE SVt_IV)
        {
          lERROR("Node::New : CPR : Arg 7 must be y coord integer!\n");
          goto END;
        }
        retp   = NodeMalloc(ltype
                            ,SvIV(ST(2))
                            ,SvIV(ST(3))
                            ,SvIV(ST(4))
                            ,SvIV(ST(5))
                            ,SvIV(ST(6))
                            ,SvIV(ST(7)));
        break;

...
  } /* end switch */
  END:
  RETVAL = retp;
}
OUTPUT:
  RETVAL



Here's the result:
20 at lp_libcell_1.3.pl line 234, <CELLLIST> chunk 1.
20 at lp_libcell_1.3.pl line 235, <CELLLIST> chunk 1.
81 at lp_libcell_1.3.pl line 236, <CELLLIST> chunk 1.
 #items = '8'
  laffClib  ERROR  : Laff.xs          : XS_Laff__Node_New         : line# 970 : 
Node::New : CPR : Arg 2 must be layer integer!
Warning: something's wrong at lp_libcell_1.3.pl line 238, <CELLLIST> chunk 1.
Can't call method "Parent" on an undefined value at lp_libcell_1.3.pl line 239, 
<CELLLIST> chunk 1.


Reply via email to