Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
495d33e9
Commit
495d33e9
authored
Jun 04, 2015
by
Vincent Castellano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for tgl.import_chat_link(str)
Also fix bug with tgl.extf
parent
af9f7b6c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
python-tg.c
python-tg.c
+11
-2
No files found.
python-tg.c
View file @
495d33e9
...
@@ -467,7 +467,8 @@ enum py_query_type {
...
@@ -467,7 +467,8 @@ enum py_query_type {
pq_status_online
,
pq_status_online
,
pq_status_offline
,
pq_status_offline
,
pq_send_location
,
pq_send_location
,
pq_extf
pq_extf
,
pq_import_chat_link
};
};
void
py_empty_cb
(
struct
tgl_state
*
TLSR
,
void
*
cb_extra
,
int
success
)
{
void
py_empty_cb
(
struct
tgl_state
*
TLSR
,
void
*
cb_extra
,
int
success
)
{
...
@@ -1062,7 +1063,13 @@ void py_do_all (void) {
...
@@ -1062,7 +1063,13 @@ void py_do_all (void) {
break
;
break
;
case
pq_extf
:
case
pq_extf
:
if
(
PyArg_ParseTuple
(
args
,
"s#|O"
,
&
str
,
&
len
,
&
cb_extra
))
if
(
PyArg_ParseTuple
(
args
,
"s#|O"
,
&
str
,
&
len
,
&
cb_extra
))
tgl_do_send_extf
(
TLS
,
str
,
len
,
py_str_cb
,
&
cb_extra
);
tgl_do_send_extf
(
TLS
,
str
,
len
,
py_str_cb
,
cb_extra
);
else
PyErr_Print
();
break
;
case
pq_import_chat_link
:
if
(
PyArg_ParseTuple
(
args
,
"s#|O"
,
&
str
,
&
len
,
&
cb_extra
))
tgl_do_import_chat_link
(
TLS
,
str
,
len
,
py_empty_cb
,
cb_extra
);
else
else
PyErr_Print
();
PyErr_Print
();
break
;
break
;
...
@@ -1146,6 +1153,7 @@ PyObject* py_status_online(PyObject *self, PyObject *args) { return push_py_func
...
@@ -1146,6 +1153,7 @@ PyObject* py_status_online(PyObject *self, PyObject *args) { return push_py_func
PyObject
*
py_status_offline
(
PyObject
*
self
,
PyObject
*
args
)
{
return
push_py_func
(
pq_status_offline
,
args
);
}
PyObject
*
py_status_offline
(
PyObject
*
self
,
PyObject
*
args
)
{
return
push_py_func
(
pq_status_offline
,
args
);
}
PyObject
*
py_send_location
(
PyObject
*
self
,
PyObject
*
args
)
{
return
push_py_func
(
pq_send_location
,
args
);
}
PyObject
*
py_send_location
(
PyObject
*
self
,
PyObject
*
args
)
{
return
push_py_func
(
pq_send_location
,
args
);
}
PyObject
*
py_extf
(
PyObject
*
self
,
PyObject
*
args
)
{
return
push_py_func
(
pq_extf
,
args
);
}
PyObject
*
py_extf
(
PyObject
*
self
,
PyObject
*
args
)
{
return
push_py_func
(
pq_extf
,
args
);
}
PyObject
*
py_import_chat_link
(
PyObject
*
self
,
PyObject
*
args
)
{
return
push_py_func
(
pq_import_chat_link
,
args
);
}
extern
int
safe_quit
;
extern
int
safe_quit
;
extern
int
exit_code
;
extern
int
exit_code
;
...
@@ -1232,6 +1240,7 @@ static PyMethodDef py_tgl_methods[] = {
...
@@ -1232,6 +1240,7 @@ static PyMethodDef py_tgl_methods[] = {
{
"status_offline"
,
py_status_offline
,
METH_VARARGS
,
""
},
{
"status_offline"
,
py_status_offline
,
METH_VARARGS
,
""
},
{
"send_location"
,
py_send_location
,
METH_VARARGS
,
""
},
{
"send_location"
,
py_send_location
,
METH_VARARGS
,
""
},
{
"ext_function"
,
py_extf
,
METH_VARARGS
,
""
},
{
"ext_function"
,
py_extf
,
METH_VARARGS
,
""
},
{
"import_chat_link"
,
py_import_chat_link
,
METH_VARARGS
,
""
},
{
"set_on_binlog_replay_end"
,
set_py_binlog_end
,
METH_VARARGS
,
""
},
{
"set_on_binlog_replay_end"
,
set_py_binlog_end
,
METH_VARARGS
,
""
},
{
"set_on_get_difference_end"
,
set_py_diff_end
,
METH_VARARGS
,
""
},
{
"set_on_get_difference_end"
,
set_py_diff_end
,
METH_VARARGS
,
""
},
{
"set_on_our_id"
,
set_py_our_id
,
METH_VARARGS
,
""
},
{
"set_on_our_id"
,
set_py_our_id
,
METH_VARARGS
,
""
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment