TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Plugins in C

51 pointsby malloc47almost 13 years ago

5 comments

jawngeealmost 13 years ago
Why not export a struct with function pointers like everyone else? You should take a look at how VST plugins are implemented.<p>You load the dlo, call a function passing in your own struct of application functions and get back a struct of plugin functions. No weird naming conventions needed, easily version-able. Tried and true.
评论 #4427020 未加载
评论 #4434389 未加载
评论 #4428756 未加载
评论 #4426734 未加载
yorhelalmost 13 years ago
On a related note: Be wary of the dlclose() function, it may not necessarily free any resources[1] and not every libc implements it correctly[2].<p>1. <a href="http://www.openwall.com/lists/musl/2012/08/20/1" rel="nofollow">http://www.openwall.com/lists/musl/2012/08/20/1</a> 2. <a href="http://www.openwall.com/lists/musl/2012/08/23/20" rel="nofollow">http://www.openwall.com/lists/musl/2012/08/23/20</a>
评论 #4427689 未加载
mmarianialmost 13 years ago
Here's the link to the intro article, all in Python3.<p><a href="http://eli.thegreenplace.net/2012/08/07/fundamental-concepts-of-plugin-infrastructures/" rel="nofollow">http://eli.thegreenplace.net/2012/08/07/fundamental-concepts...</a>
ps2000almost 13 years ago
"While C itself is a relatively rigid language"
fdelapenaalmost 13 years ago
I use libpeas<p>bye