Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ compatibility fixes #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scheme.tl
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ chatInviteEmpty#69df3769 = ExportedChatInvite;
chatInviteExported#fc2e05bc link:string = ExportedChatInvite;

chatInviteAlready#5a686d7c chat:Chat = ChatInvite;
chatInvite#93e99b60 flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true title:string = ChatInvite;
chatInvite#93e99b60 flags:# channel:flags.0?true broadcast:flags.1?true public_:flags.2?true megagroup:flags.3?true title:string = ChatInvite;

inputStickerSetEmpty#ffb62b95 = InputStickerSet;
inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
Expand Down
10 changes: 9 additions & 1 deletion tgl-queries.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

#include "tgl.h"

#ifdef __cplusplus
extern "C" {
#endif

void tgl_do_get_terms_of_service (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *ans), void *callback_extra);

/* {{{ WORK WITH ACCOUNT */
Expand Down Expand Up @@ -121,7 +125,7 @@ void tgl_do_export_chat_link (struct tgl_state *TLS, tgl_peer_id_t id, void (*ca
// joins to secret chat by link (or hash of this link)
void tgl_do_import_chat_link (struct tgl_state *TLS, const char *link, int link_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);

// upgrades chat to channel.
// upgrades chat to channel.
void tgl_do_upgrade_group (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);
/* }}} */

Expand Down Expand Up @@ -293,4 +297,8 @@ char *tglf_extf_fetch (struct tgl_state *TLS, struct paramed_type *T);
void tgl_do_start_bot (struct tgl_state *TLS, tgl_peer_id_t bot, tgl_peer_id_t chat, const char *str, int str_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);
/* }}} */

#ifdef __cplusplus
}
#endif

#endif
3 changes: 2 additions & 1 deletion tgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ struct tgl_state {
long long rsa_key_fingerprint[TGL_MAX_RSA_KEYS_NUM];
int rsa_key_num;

TGLC_bn_ctx *TGLC_bn_ctx;
struct TGLC_bn_ctx *TGLC_bn_ctx;

struct tgl_allocator *allocator;

Expand Down Expand Up @@ -386,6 +386,7 @@ void tgl_disable_link_preview (struct tgl_state *TLS);
void tgl_do_lookup_state (struct tgl_state *TLS);

long long tgl_get_allocated_bytes (void);

#ifdef __cplusplus
}
#endif
Expand Down