1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-11-27 04:34:42 +01:00
This commit is contained in:
Grishka 2018-01-24 17:56:42 +03:00
parent 55c2202937
commit 6b0d4a6cc3
4 changed files with 10 additions and 7 deletions

View File

@ -181,10 +181,9 @@ extern "C" JNIEXPORT void Java_org_telegram_messenger_voip_VoIPController_native
VoIPController* ctlr=((VoIPController*)(intptr_t)inst);
impl_data_android_t* impl=(impl_data_android_t*)ctlr->implData;
delete ctlr;
env->DeleteGlobalRef(impl->javaObject);
((impl_data_android_t*)ctlr->implData)->javaObject=NULL;
free(impl);
delete ctlr;
}

View File

@ -11,6 +11,8 @@
extern "C" {
#endif
extern void (*TGVoipLoggingFunction)(NSString *);
void __tgvoip_call_tglog(const char* format, ...);
#if defined __cplusplus

View File

@ -1,10 +1,12 @@
#import <Foundation/Foundation.h>
extern void TGLogv(NSString *format, va_list args);
void (*TGVoipLoggingFunction)(NSString *) = NULL;
void __tgvoip_call_tglog(const char* format, ...){
va_list args;
va_start(args, format);
TGLogv([[NSString alloc]initWithUTF8String:format], args);
va_end(args);
if (TGVoipLoggingFunction != nil) {
va_list args;
va_start(args, format);
TGVoipLoggingFunction([[NSString alloc]initWithFormat:[[NSString alloc] initWithUTF8String:format] arguments:args]);
va_end(args);
}
}

0
os/windows/CXWrapper.h Executable file → Normal file
View File