惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog
D
DataBreaches.Net
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Vulnerabilities – Threatpost
Jina AI
Jina AI
T
Threat Research - Cisco Blogs
The Hacker News
The Hacker News
Latest news
Latest news
博客园_首页
T
Tenable Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
Spread Privacy
Spread Privacy
Martin Fowler
Martin Fowler
Y
Y Combinator Blog
P
Privacy & Cybersecurity Law Blog
C
Cisco Blogs
I
InfoQ
The Cloudflare Blog
J
Java Code Geeks
C
Cybersecurity and Infrastructure Security Agency CISA
量子位
P
Proofpoint News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
AWS News Blog
AWS News Blog
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
The Register - Security
The Register - Security
M
MIT News - Artificial intelligence
G
Google Developers Blog
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
D
Darknet – Hacking Tools, Hacker News & Cyber Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
Project Zero
Project Zero
P
Privacy International News Feed
Engineering at Meta
Engineering at Meta
G
GRAHAM CLULEY
博客园 - Franky
C
CERT Recently Published Vulnerability Notes

博客园 - SweetDream

如何使用SecureCRT连接ubuntu (转) 转 linux共享 VC++中的char,wchar_t,TCHAR(转载) 【转】Linux内核学习笔记(5)连载---实模式、保护模式和虚拟8086方式 concept 计算机英语 C++备忘录(记录一些不常使用的语法规则) Effective STL 笔记 <容器> VS2005 快捷键 网摘 君心莫邪 迭代器(iterators) 空间配置器(allocator) 函数返回引用或指针的选择 【转】最节省时间的方法——学习 C++数据类型速查 Cegui的事件机制 C++不定参数 Lua 与 C 交互(1)
Lua 与 C 交互(2)
SweetDream · 2008-10-15 · via 博客园 - SweetDream

1.new tbClass{}, Binding "FunName" to C function "thunk" and set it's closure with upvalue;

2.rigister metatable "Class", and set metatable __index to table"tbClass"

3.new pObj, new userdata to point it, and set this userdata's metatable then push it into stack.

4.call Obj:FunName()

5.because Obj associate tbClass by metatable, so will call tbClass[FunName], then call thunk, remember thunk have upvalue.

6.when we have userdata whitch have pObj,and have upvalue,then CallFun

1.new tbClass{},Encapsulation all Class Memeber as KLuaData. tbClass[FunName] = KLuaData.KLuaData push as userdata.

2.rigister metatable "Class", and set metatable __index to C Function "_LuaIndex"

3.push userdata who's restore pObj, and set metatable

4.Call a.FunName()

5.Call C Function _LuaIndex,in this can get pObj and KLuaData,switch kind of KLuaData,execute diff Op.

6.if KLuaData is FunData, then push pObj,and FunData, and CFun "_LuaDispatcher",then () will Call this Fun

7.CallFun