File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -569,6 +569,7 @@ static const struct luaL_Reg lcurl_hpost_methods[] = {
569
569
{"get" , lcurl_hpost_get },
570
570
{"free" , lcurl_hpost_free },
571
571
{"__gc" , lcurl_hpost_free },
572
+ {"__tostring" , lcurl_hpost_to_s },
572
573
573
574
{NULL ,NULL }
574
575
};
Original file line number Diff line number Diff line change @@ -187,6 +187,12 @@ static const char* LCURL_USERVAL = "LCURL Uservalues";
187
187
188
188
static int luaopen_lcurl_ (lua_State * L , const struct luaL_Reg * func ){
189
189
if (!LCURL_INIT ){
190
+ /* Note from libcurl documentation.
191
+ *
192
+ * The environment it sets up is constant for the life of the program
193
+ * and is the same for every program, so multiple calls have the same
194
+ * effect as one call. ... This function is not thread safe.
195
+ */
190
196
curl_global_init (CURL_GLOBAL_DEFAULT );
191
197
LCURL_INIT = 1 ;
192
198
}
You can’t perform that action at this time.
0 commit comments