摘要: lua栈索引顺序说明 从栈顶往栈底:-1, -2, -3...... 从栈底往栈顶: 1, 2, 3...... 操作表 LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); //创建新表, 压入栈顶, narr为初始数 阅读全文
posted @ 2025-02-17 23:38 yanghui01 阅读(145) 评论(0) 推荐(0)
摘要: 跨平台类型 char, unsigned char, int8_t, uint8_t: 1字节 short, unsigned short, int16_t, uint16_t: 2字节 int32_t, uint32_t: 4字节 long long, unsigned long long: 8字 阅读全文
posted @ 2025-02-17 22:59 yanghui01 阅读(35) 评论(0) 推荐(0)
摘要: char数组 //char数组就是n个地址连续的char static void print_char_arr(char *p, size_t len) { for (size_t i = 0; i < len; ++i) { char c = *(p + i); printf("%c ", c); 阅读全文
posted @ 2025-02-17 22:47 yanghui01 阅读(18) 评论(0) 推荐(0)