diff options
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 6 | ||||
-rw-r--r-- | protocols/FacebookRM/src/dialogs.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/utils.cpp | 20 | ||||
-rw-r--r-- | protocols/FacebookRM/src/utils.h | 8 |
5 files changed, 5 insertions, 33 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index fb054e63e1..ab54ee1f9d 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -76,8 +76,8 @@ http::response facebook_client::flap(RequestType request_type, std::string* requ NETLIBHTTPREQUEST* pnlhr = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)handle_, (LPARAM)&nlhr);
- utils::mem::detract(nlhr.headers[3].szValue);
- utils::mem::detract(nlhr.headers);
+ mir_free(nlhr.headers[3].szValue);
+ mir_free(nlhr.headers);
http::response resp;
@@ -576,7 +576,7 @@ NETLIBHTTPHEADER* facebook_client::get_request_headers(int request_type, int* he else
*headers_count = 4;
- NETLIBHTTPHEADER* headers = (NETLIBHTTPHEADER*)utils::mem::allocate(sizeof(NETLIBHTTPHEADER)*(*headers_count));
+ NETLIBHTTPHEADER* headers = (NETLIBHTTPHEADER*)mir_calloc(sizeof(NETLIBHTTPHEADER)*(*headers_count));
if (request_type == REQUEST_POST)
{
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index fa29e6bc2f..36534465a5 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -222,7 +222,7 @@ INT_PTR CALLBACK FBMindProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpara if (status->user_id == data->proto->facy.self_.user_id && data->proto->last_status_msg_ != narrow)
data->proto->last_status_msg_ = narrow;
- utils::mem::detract(narrow);
+ mir_free(narrow);
data->proto->ForkThread(&FacebookProto::SetAwayMsgWorker, status);
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index cf12dea71e..117bb2c03c 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -190,7 +190,7 @@ int FacebookProto::SetAwayMsg(int status, const PROTOCHAR *msg) char *narrow = mir_utf8encodeT(msg);
if (last_status_msg_ != narrow)
last_status_msg_ = narrow;
- utils::mem::detract(narrow);
+ mir_free(narrow);
if (isOnline() && getByte(FACEBOOK_KEY_SET_MIRANDA_STATUS, DEFAULT_SET_MIRANDA_STATUS))
ForkThread(&FacebookProto::SetAwayMsgWorker, NULL);
diff --git a/protocols/FacebookRM/src/utils.cpp b/protocols/FacebookRM/src/utils.cpp index 3155c720f8..d02b3901eb 100644 --- a/protocols/FacebookRM/src/utils.cpp +++ b/protocols/FacebookRM/src/utils.cpp @@ -490,26 +490,6 @@ int utils::debug::log(std::string file_name, std::string text) return EXIT_SUCCESS;
}
-void __fastcall utils::mem::detract(char** str)
-{
- utils::mem::detract((void**)str);
-}
-
-void __fastcall utils::mem::detract(void** p)
-{
- utils::mem::detract((void*)(*p));
-}
-
-void __fastcall utils::mem::detract(void* p)
-{
- mir_free(p);
-}
-
-void* __fastcall utils::mem::allocate(size_t size)
-{
- return mir_calloc(size);
-}
-
struct
{
char *ext;
diff --git a/protocols/FacebookRM/src/utils.h b/protocols/FacebookRM/src/utils.h index da6e7334fe..6839a4367e 100644 --- a/protocols/FacebookRM/src/utils.h +++ b/protocols/FacebookRM/src/utils.h @@ -85,14 +85,6 @@ namespace utils {
int log(std::string file_name, std::string text);
};
-
- namespace mem
- {
- void __fastcall detract(char** str);
- void __fastcall detract(void** p);
- void __fastcall detract(void* p);
- void* __fastcall allocate(size_t size);
- };
};
class ScopedLock
|