摘要: 注册在curl表下,可以看作curl类的static函数 static const struct luaL_reg luacurl_funcs[] = { {"new", lcurl_easy_init}, {"escape", lcurl_escape}, {"unescape", lcurl_u 阅读全文
posted @ 2025-07-05 15:52 yanghui01 阅读(6) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <curl/curl.h> #include <lauxlib.h> // 回调函数,用于处理响应数据 size_t write_callback(void *contents, size_t size, size_t nmemb, char 阅读全文
posted @ 2025-07-05 08:38 yanghui01 阅读(23) 评论(0) 推荐(0)
摘要: 从入口函数开始 LUACURL_API int luaopen_luacurl (lua_State *L) { printf("luaopen_luacurl begin: %d, %s\n", lua_gettop(L), lua_typename(L, lua_type(L, -1))); / 阅读全文
posted @ 2025-07-05 08:22 yanghui01 阅读(19) 评论(0) 推荐(0)