コード例 #1
0
 public void set(YYSTYPE s)
 {
     this.vInt   = s.vInt;
     this.vFloat = s.vFloat;
     this.vWord  = s.vWord;
     this.vLong  = s.vLong;
     if (s.pByte != null)
     {
         this.pByte = new BytePtr(s.pByte);
     }
     else
     {
         this.pByte = null;
     }
     if (s.pChar != null)
     {
         this.pChar = new CharPtr(s.pChar);
     }
     else
     {
         this.pChar = null;
     }
     if (s.pNode != null)
     {
         this.pNode = s.pNode;                     //???
     }
     else
     {
         this.pNode = null;
     }
 }
コード例 #2
0
 public static YYSTYPE[] malloc_YYSTYPE(int yynewmax)
 {
     YYSTYPE[] temp1 = new YYSTYPE[yynewmax];
     for (int kk = 0; kk < temp1.Length; ++kk)
     {
         temp1[kk] = new YYSTYPE();
     }
     return(temp1);
 }
コード例 #3
0
 public void set(YYSTYPE s)
 {
     this.vInt   = s.vInt;
     this.vLong  = s.vLong;
     this.vFloat = s.vFloat;
     this.vWord  = s.vWord;
     if (s.pByte != null)
     {
         this.pByte = new BytePtr(s.pByte);
     }
     else
     {
         this.pByte = null;
     }
 }
コード例 #4
0
ファイル: CLib.cs プロジェクト: weimingtom/KopiLuaCompare
 public static YYSTYPE[] realloc_YYSTYPE(YYSTYPE[] obj, uint size)
 {
     YYSTYPE[] ret = new YYSTYPE[size];
     for (int i = 0; i < obj.Length; ++i)
     {
         if (i < obj.Length)
         {
             ret[i] = obj[i];
         }
         else
         {
             ret[i] = new YYSTYPE();
         }
     }
     return(ret);
 }