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
434ccdd5
Commit
434ccdd5
authored
May 07, 2015
by
Vincent Castellano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py_DECREF the results from python calls in callbacks
parent
8679ab2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
python-tg.c
python-tg.c
+10
-0
No files found.
python-tg.c
View file @
434ccdd5
...
...
@@ -374,6 +374,7 @@ void py_binlog_end (void) {
else
if
(
PyString_Check
(
result
))
logprintf
(
"python: %s
\n
"
,
PyString_AsString
(
result
));
Py_DECREF
(
result
);
}
void
py_diff_end
(
void
)
{
...
...
@@ -387,6 +388,8 @@ void py_diff_end (void) {
PyErr_Print
();
else
if
(
PyString_Check
(
result
))
logprintf
(
"python: %s
\n
"
,
PyString_AsString
(
result
));
Py_DECREF
(
result
);
}
void
py_our_id
(
int
id
)
{
...
...
@@ -400,6 +403,8 @@ void py_our_id (int id) {
PyErr_Print
();
else
if
(
PyString_Check
(
result
))
logprintf
(
"python: %s
\n
"
,
PyString_AsString
(
result
));
Py_DECREF
(
result
);
}
void
py_new_msg
(
struct
tgl_message
*
M
)
{
...
...
@@ -418,6 +423,7 @@ void py_new_msg (struct tgl_message *M) {
else
if
(
PyString_Check
(
result
))
logprintf
(
"python: %s
\n
"
,
PyString_AsString
(
result
));
Py_DECREF
(
result
);
}
void
py_secret_chat_update
(
struct
tgl_secret_chat
*
C
,
unsigned
flags
)
{
...
...
@@ -437,6 +443,7 @@ void py_secret_chat_update (struct tgl_secret_chat *C, unsigned flags) {
else
if
(
PyString_Check
(
result
))
logprintf
(
"python: %s
\n
"
,
PyString_AsString
(
result
));
Py_DECREF
(
result
);
}
...
...
@@ -457,6 +464,7 @@ void py_user_update (struct tgl_user *U, unsigned flags) {
else
if
(
PyString_Check
(
result
))
logprintf
(
"python: %s
\n
"
,
PyString_AsString
(
result
));
Py_DECREF
(
result
);
}
void
py_chat_update
(
struct
tgl_chat
*
C
,
unsigned
flags
)
{
...
...
@@ -476,6 +484,8 @@ void py_chat_update (struct tgl_chat *C, unsigned flags) {
PyErr_Print
();
else
if
(
PyString_Check
(
result
))
logprintf
(
"python: %s
\n
"
,
PyString_AsString
(
result
));
Py_DECREF
(
result
);
}
////extern tgl_peer_t *Peers[];
...
...
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