Chinaunix首页 | 论坛 | 博客
  • 博客访问: 510026
  • 博文数量: 130
  • 博客积分: 10060
  • 博客等级: 上将
  • 技术积分: 1720
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-21 12:35
文章分类

全部博文(130)

文章存档

2011年(2)

2010年(9)

2009年(41)

2008年(78)

我的朋友

分类:

2009-02-19 21:33:54

不说别的,看看核心的数据结构,你能看到各种风格的命名方式,好像诚心跟人过不去,不想让人看啊;本来想一一标出来的,猛然发现,不用了,用不着,您从头到尾看下去,几乎每个都不一样:

/*
** `per thread' state
*/

struct lua_State {
  CommonHeader;
  lu_byte status;
  StkId top; /* first free slot in the stack */
  StkId base; /* base of current function */
  global_State *l_G;
  CallInfo *ci; /* call info for current function */
  const Instruction *savedpc; /* `savedpc' of current function */
  StkId stack_last; /* last free slot in the stack */
  StkId stack; /* stack base */
  CallInfo *end_ci; /* points after end of ci array*/
  CallInfo *base_ci; /* array of CallInfo's */
  int stacksize;
  int size_ci; /* size of array `base_ci' */
  unsigned short nCcalls; /* number of nested C calls */
  unsigned short baseCcalls; /* nested C calls when resuming coroutine */
  lu_byte hookmask;
  lu_byte allowhook;
  int basehookcount;
  int hookcount;
  lua_Hook hook;
  TValue l_gt; /* table of globals */
  TValue env; /* temporary place for environments */
  GCObject *openupval; /* list of open upvalues in this stack */
  GCObject *gclist;
  struct lua_longjmp *errorJmp; /* current error recover point */
  ptrdiff_t errfunc; /* current error handling function (stack index) */
};

阅读(983) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~