Fix. Unify tostring
methods
This commit is contained in:
parent
56b4d05c17
commit
54a75bd25e
@ -93,13 +93,13 @@ int lcurl_easy_create(lua_State *L, int error_mode){
|
||||
|
||||
lcurl_easy_t *lcurl_geteasy_at(lua_State *L, int i){
|
||||
lcurl_easy_t *p = (lcurl_easy_t *)lutil_checkudatap (L, i, LCURL_EASY);
|
||||
luaL_argcheck (L, p != NULL, 1, LCURL_EASY_NAME" expected");
|
||||
luaL_argcheck (L, p != NULL, 1, LCURL_EASY_NAME" object expected");
|
||||
return p;
|
||||
}
|
||||
|
||||
static int lcurl_easy_to_s(lua_State *L){
|
||||
lcurl_easy_t *p = (lcurl_easy_t *)lutil_checkudatap (L, 1, LCURL_EASY);
|
||||
lua_pushfstring(L, LCURL_PREFIX " Easy (%p)", (void*)p);
|
||||
lua_pushfstring(L, LCURL_EASY_NAME" (%p)", (void*)p);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -112,10 +112,16 @@ int lcurl_hpost_create(lua_State *L, int error_mode){
|
||||
|
||||
lcurl_hpost_t *lcurl_gethpost_at(lua_State *L, int i){
|
||||
lcurl_hpost_t *p = (lcurl_hpost_t *)lutil_checkudatap (L, i, LCURL_HTTPPOST);
|
||||
luaL_argcheck (L, p != NULL, 1, LCURL_PREFIX"HTTPPost object expected");
|
||||
luaL_argcheck (L, p != NULL, 1, LCURL_HTTPPOST_NAME" object expected");
|
||||
return p;
|
||||
}
|
||||
|
||||
static int lcurl_hpost_to_s(lua_State *L){
|
||||
lcurl_hpost_t *p = (lcurl_hpost_t *)lutil_checkudatap (L, 1, LCURL_HTTPPOST);
|
||||
lua_pushfstring(L, LCURL_HTTPPOST_NAME" (%p)", (void*)p);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lcurl_hpost_add_content(lua_State *L){
|
||||
// add_buffer(name, data, [type,] [headers])
|
||||
lcurl_hpost_t *p = lcurl_gethpost(L);
|
||||
|
@ -71,13 +71,13 @@ int lcurl_multi_create(lua_State *L, int error_mode){
|
||||
|
||||
lcurl_multi_t *lcurl_getmulti_at(lua_State *L, int i){
|
||||
lcurl_multi_t *p = (lcurl_multi_t *)lutil_checkudatap (L, i, LCURL_MULTI);
|
||||
luaL_argcheck (L, p != NULL, 1, LCURL_MULTI_NAME" expected");
|
||||
luaL_argcheck (L, p != NULL, 1, LCURL_MULTI_NAME" object expected");
|
||||
return p;
|
||||
}
|
||||
|
||||
static int lcurl_multi_to_s(lua_State *L){
|
||||
lcurl_multi_t *p = (lcurl_multi_t *)lutil_checkudatap (L, 1, LCURL_MULTI);
|
||||
lua_pushfstring(L, LCURL_PREFIX " Multi (%p)", (void*)p);
|
||||
lua_pushfstring(L, LCURL_MULTI_NAME" (%p)", (void*)p);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -39,13 +39,13 @@ int lcurl_share_create(lua_State *L, int error_mode){
|
||||
|
||||
lcurl_share_t *lcurl_getshare_at(lua_State *L, int i){
|
||||
lcurl_share_t *p = (lcurl_share_t *)lutil_checkudatap (L, i, LCURL_SHARE);
|
||||
luaL_argcheck (L, p != NULL, 1, LCURL_SHARE_NAME" expected");
|
||||
luaL_argcheck (L, p != NULL, 1, LCURL_SHARE_NAME" object expected");
|
||||
return p;
|
||||
}
|
||||
|
||||
static int lcurl_easy_to_s(lua_State *L){
|
||||
lcurl_share_t *p = (lcurl_share_t *)lutil_checkudatap (L, 1, LCURL_SHARE);
|
||||
lua_pushfstring(L, LCURL_PREFIX " Share (%p)", (void*)p);
|
||||
lua_pushfstring(L, LCURL_SHARE_NAME" (%p)", (void*)p);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user