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
d001bcd2
Commit
d001bcd2
authored
May 17, 2015
by
Vincent Castellano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Const fixes again, hoping this won't break anything
parent
3af44a3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
python-tg.c
python-tg.c
+6
-6
No files found.
python-tg.c
View file @
d001bcd2
...
...
@@ -977,7 +977,7 @@ void py_do_all (void) {
break
;
case
pq_rename_chat
:
PyArg_ParseTuple
(
args
,
"iis#|O"
,
&
peer
.
type
,
&
peer
.
id
,
&
str
,
&
len
,
&
cb_extra
);
tgl_do_rename_chat
(
TLS
,
peer
,
str
,
len
,
py_
msg
_cb
,
cb_extra
);
tgl_do_rename_chat
(
TLS
,
peer
,
str
,
len
,
py_
empty
_cb
,
cb_extra
);
break
;
case
pq_send_photo
:
PyArg_ParseTuple
(
args
,
"iis|O"
,
&
peer
.
type
,
&
peer
.
id
,
&
str
,
&
cb_extra
);
...
...
@@ -1005,7 +1005,7 @@ void py_do_all (void) {
break
;
case
pq_chat_set_photo
:
PyArg_ParseTuple
(
args
,
"iis|O"
,
&
peer
.
type
,
&
peer
.
id
,
&
str
,
&
cb_extra
);
tgl_do_set_chat_photo
(
TLS
,
peer
,
str
,
py_
msg
_cb
,
cb_extra
);
tgl_do_set_chat_photo
(
TLS
,
peer
,
str
,
py_
empty
_cb
,
cb_extra
);
break
;
/* case pq_load_photo:
case pq_load_video:
...
...
@@ -1052,11 +1052,11 @@ void py_do_all (void) {
break
;
case
pq_chat_add_user
:
PyArg_ParseTuple
(
args
,
"iiii|O"
,
&
peer
.
type
,
&
peer
.
id
,
&
peer1
.
type
,
&
peer1
.
id
,
&
cb_extra
);
tgl_do_add_user_to_chat
(
TLS
,
peer
,
peer1
,
100
,
py_
msg
_cb
,
cb_extra
);
tgl_do_add_user_to_chat
(
TLS
,
peer
,
peer1
,
100
,
py_
empty
_cb
,
cb_extra
);
break
;
case
pq_chat_del_user
:
PyArg_ParseTuple
(
args
,
"iiii|O"
,
&
peer
.
type
,
&
peer
.
id
,
&
peer
.
type
,
&
peer
.
id
,
&
cb_extra
);
tgl_do_del_user_from_chat
(
TLS
,
peer
,
peer1
,
py_
msg
_cb
,
cb_extra
);
tgl_do_del_user_from_chat
(
TLS
,
peer
,
peer1
,
py_
empty
_cb
,
cb_extra
);
break
;
/* case pq_add_contact:
tgl_do_add_contact (TLS, s1, strlen (s1), s2, strlen (s2), s3, strlen (s3), 0, py_contact_list_cb, py_ptr[p]);
...
...
@@ -1319,10 +1319,10 @@ void py_init (const char *file) {
PyList_Append
(
sysPath
,
PyUnicode_FromString
(
dirname
(
filename
)));
// remove .py extension from file, if any
char
*
dot
=
strrchr
(
file
,
'.'
);
char
*
dot
=
strrchr
(
file
name
,
'.'
);
if
(
dot
&&
strcmp
(
dot
,
".py"
)
==
0
)
*
dot
=
0
;
pModule
=
PyImport_Import
(
PyUnicode_FromString
(
basename
(
file
)));
pModule
=
PyImport_Import
(
PyUnicode_FromString
(
basename
(
file
name
)));
if
(
pModule
==
NULL
||
PyErr_Occurred
())
{
// Error loading script
logprintf
(
"Failed to load python script
\n
"
);
...
...
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