Fix tdweb build.
GitOrigin-RevId: 8f348a00d05336163c7ea4214ab35a4aea2d2b65
This commit is contained in:
parent
5ac5acd1cb
commit
8460bb7cd5
@ -619,14 +619,14 @@ class TdClient {
|
||||
this.TdModule = await loadTdlib(mode, this.onFS, options.wasmUrl);
|
||||
log.info('got TdModule');
|
||||
this.td_functions = {
|
||||
td_create: this.TdModule.cwrap('td_create', 'number', []),
|
||||
td_destroy: this.TdModule.cwrap('td_destroy', null, ['number']),
|
||||
td_send: this.TdModule.cwrap('td_send', null, ['number', 'string']),
|
||||
td_execute: this.TdModule.cwrap('td_execute', 'string', [
|
||||
td_create: this.TdModule.cwrap('td_emscripten_create', 'number', []),
|
||||
td_destroy: this.TdModule.cwrap('td_emscripten_destroy', null, ['number']),
|
||||
td_send: this.TdModule.cwrap('td_emscripten_send', null, ['number', 'string']),
|
||||
td_execute: this.TdModule.cwrap('td_emscripten_execute', 'string', [
|
||||
'number',
|
||||
'string'
|
||||
]),
|
||||
td_receive: this.TdModule.cwrap('td_receive', 'string', ['number']),
|
||||
td_receive: this.TdModule.cwrap('td_emscripten_receive', 'string', ['number']),
|
||||
td_set_verbosity: verbosity => {
|
||||
this.td_functions.td_execute(
|
||||
0,
|
||||
@ -636,7 +636,7 @@ class TdClient {
|
||||
})
|
||||
);
|
||||
},
|
||||
td_get_timeout: this.TdModule.cwrap('td_get_timeout', 'number', [])
|
||||
td_get_timeout: this.TdModule.cwrap('td_emscripten_get_timeout', 'number', [])
|
||||
};
|
||||
//this.onFS(this.TdModule.FS);
|
||||
this.FS = this.TdModule.FS;
|
||||
|
@ -13,22 +13,22 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE void *td_create() {
|
||||
EMSCRIPTEN_KEEPALIVE void *td_emscripten_create() {
|
||||
return td_json_client_create();
|
||||
}
|
||||
EMSCRIPTEN_KEEPALIVE void td_send(void *client, const char *query) {
|
||||
EMSCRIPTEN_KEEPALIVE void td_emscripten_send(void *client, const char *query) {
|
||||
td_json_client_send(client, query);
|
||||
}
|
||||
EMSCRIPTEN_KEEPALIVE const char *td_receive(void *client) {
|
||||
EMSCRIPTEN_KEEPALIVE const char *td_emscripten_receive(void *client) {
|
||||
return td_json_client_receive(client, 0);
|
||||
}
|
||||
EMSCRIPTEN_KEEPALIVE const char *td_execute(void *client, const char *query) {
|
||||
EMSCRIPTEN_KEEPALIVE const char *td_emscripten_execute(void *client, const char *query) {
|
||||
return td_json_client_execute(client, query);
|
||||
}
|
||||
EMSCRIPTEN_KEEPALIVE void td_destroy(void *client) {
|
||||
EMSCRIPTEN_KEEPALIVE void td_emscripten_destroy(void *client) {
|
||||
td_json_client_destroy(client);
|
||||
}
|
||||
EMSCRIPTEN_KEEPALIVE double td_get_timeout() {
|
||||
EMSCRIPTEN_KEEPALIVE double td_emscripten_get_timeout() {
|
||||
return td::ConcurrentScheduler::emscripten_get_main_timeout();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user