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
5576d7a0
Commit
5576d7a0
authored
May 20, 2015
by
Vincent Castellano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python build fixes
parent
f1eda8ac
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
11 deletions
+18
-11
Makefile.in
Makefile.in
+1
-1
ax_python.m4
ax_python.m4
+1
-2
configure
configure
+2
-4
loop.c
loop.c
+4
-0
python-tg.c
python-tg.c
+1
-1
python-types.c
python-types.c
+9
-3
No files found.
Makefile.in
View file @
5576d7a0
...
@@ -18,7 +18,7 @@ DIR_LIST=${DEP} ${AUTO} ${EXE} ${OBJ} ${LIB} ${DEP}/auto ${OBJ}/auto
...
@@ -18,7 +18,7 @@ DIR_LIST=${DEP} ${AUTO} ${EXE} ${OBJ} ${LIB} ${DEP}/auto ${OBJ}/auto
EXE_LIST
=
${
EXE
}
/telegram-cli
EXE_LIST
=
${
EXE
}
/telegram-cli
TG_OBJECTS
=
${
OBJ
}
/main.o
${
OBJ
}
/loop.o
${
OBJ
}
/interface.o
${
OBJ
}
/lua-tg.o
${
OBJ
}
/json-tg.o
${
OBJ
}
/python-tg.o
TG_OBJECTS
=
${
OBJ
}
/main.o
${
OBJ
}
/loop.o
${
OBJ
}
/interface.o
${
OBJ
}
/lua-tg.o
${
OBJ
}
/json-tg.o
${
OBJ
}
/python-tg.o
${
OBJ
}
/python-types.o
INCLUDE
=
-I
.
-I
${
srcdir
}
-I
${
srcdir
}
/tgl
INCLUDE
=
-I
.
-I
${
srcdir
}
-I
${
srcdir
}
/tgl
CC
=
@CC@
CC
=
@CC@
...
...
ax_python.m4
View file @
5576d7a0
...
@@ -56,8 +56,7 @@
...
@@ -56,8 +56,7 @@
AC_DEFUN([AX_PYTHON],
AC_DEFUN([AX_PYTHON],
[AC_MSG_CHECKING(for python build information)
[AC_MSG_CHECKING(for python build information)
AC_MSG_RESULT([])
AC_MSG_RESULT([])
for python in python3.4 python3.3 python3.2 python3.1 python2.7 python2.6 python3, python2, python; do
for python in python3.4 python3.3 python3.2 python3.1 python3 python2.7 python2.6 python2 python; do
AC_CHECK_PROGS(PYTHON_BIN, [$python])
AC_CHECK_PROGS(PYTHON_BIN, [$python])
ax_python_bin=$PYTHON_BIN
ax_python_bin=$PYTHON_BIN
if test x$ax_python_bin != x; then
if test x$ax_python_bin != x; then
...
...
configure
View file @
5576d7a0
...
@@ -5947,8 +5947,7 @@ $as_echo "enabled" >&6; }
...
@@ -5947,8 +5947,7 @@ $as_echo "enabled" >&6; }
$as_echo_n
"checking for python build information... "
>
&6
;
}
$as_echo_n
"checking for python build information... "
>
&6
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: "
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: "
>
&5
$as_echo
""
>
&6
;
}
$as_echo
""
>
&6
;
}
for
python
in
python3.4 python3.3 python3.2 python3.1 python2.7 python2.6 python3, python2, python
;
do
for
python
in
python3.4 python3.3 python3.2 python3.1 python3 python2.7 python2.6 python2 python
;
do
for
ac_prog
in
$python
for
ac_prog
in
$python
do
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
# Extract the first word of "$ac_prog", so it can be a program name with args.
...
@@ -6139,8 +6138,7 @@ $as_echo "enabled" >&6; }
...
@@ -6139,8 +6138,7 @@ $as_echo "enabled" >&6; }
$as_echo_n
"checking for python build information... "
>
&6
;
}
$as_echo_n
"checking for python build information... "
>
&6
;
}
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: "
>
&5
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: "
>
&5
$as_echo
""
>
&6
;
}
$as_echo
""
>
&6
;
}
for
python
in
python3.4 python3.3 python3.2 python3.1 python2.7 python2.6 python3, python2, python
;
do
for
python
in
python3.4 python3.3 python3.2 python3.1 python3 python2.7 python2.6 python2 python
;
do
for
ac_prog
in
$python
for
ac_prog
in
$python
do
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
# Extract the first word of "$ac_prog", so it can be a program name with args.
...
...
loop.c
View file @
5576d7a0
...
@@ -56,8 +56,12 @@
...
@@ -56,8 +56,12 @@
#include "interface.h"
#include "interface.h"
#include "telegram.h"
#include "telegram.h"
#include "loop.h"
#include "loop.h"
#if USE_LUA
#include "lua-tg.h"
#include "lua-tg.h"
#endif
#if USE_PYTHON
#include "python-tg.h"
#include "python-tg.h"
#endif
#include <tgl/tgl.h>
#include <tgl/tgl.h>
#include <tgl/tgl-binlog.h>
#include <tgl/tgl-binlog.h>
#include <tgl/tgl-net.h>
#include <tgl/tgl-net.h>
...
...
python-tg.c
View file @
5576d7a0
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
#ifdef USE_PYTHON
#ifdef USE_PYTHON
#include "python-tg.h"
#include "python-tg.h"
#endif
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <stdlib.h>
...
@@ -1251,3 +1250,4 @@ void py_init (const char *file) {
...
@@ -1251,3 +1250,4 @@ void py_init (const char *file) {
logprintf
(
"Python Initialized
\n
"
);
logprintf
(
"Python Initialized
\n
"
);
}
}
#endif
python-types.c
View file @
5576d7a0
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef USE_PYTHON
#include <Python.h>
#include <Python.h>
#include <tgl/tgl.h>
#include <tgl/tgl.h>
#include <tgl/tools.h>
#include <tgl/tools.h>
...
@@ -120,10 +125,9 @@ tgl_Peer_getuser_id (tgl_Peer *self, void *closure)
...
@@ -120,10 +125,9 @@ tgl_Peer_getuser_id (tgl_Peer *self, void *closure)
static
PyObject
*
static
PyObject
*
tgl_Peer_getuser_list
(
tgl_Peer
*
self
,
void
*
closure
)
tgl_Peer_getuser_list
(
tgl_Peer
*
self
,
void
*
closure
)
{
{
PyObject
*
ret
,
*
peer
;
PyObject
*
ret
;
int
i
;
int
i
;
struct
tgl_chat_user
*
user_list
;
struct
tgl_chat_user
*
user_list
;
struct
tgl_user
*
user
;
switch
(
self
->
peer
->
id
.
type
)
{
switch
(
self
->
peer
->
id
.
type
)
{
case
TGL_PEER_CHAT
:
case
TGL_PEER_CHAT
:
...
@@ -382,7 +386,7 @@ tgl_Peer_send_msg (tgl_Peer *self, PyObject *args, PyObject *kwargs)
...
@@ -382,7 +386,7 @@ tgl_Peer_send_msg (tgl_Peer *self, PyObject *args, PyObject *kwargs)
else
else
api_call
=
Py_BuildValue
(
"Os"
,
(
PyObject
*
)
self
,
message
);
api_call
=
Py_BuildValue
(
"Os"
,
(
PyObject
*
)
self
,
message
);
Py_
X
INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
Py_XINCREF
(
api_call
);
Py_XINCREF
(
api_call
);
return
py_send_msg
(
Py_None
,
api_call
);
return
py_send_msg
(
Py_None
,
api_call
);
...
@@ -868,3 +872,5 @@ tgl_Msg_FromTglMsg(struct tgl_message *msg) {
...
@@ -868,3 +872,5 @@ tgl_Msg_FromTglMsg(struct tgl_message *msg) {
self
->
msg
=
msg
;
self
->
msg
=
msg
;
return
(
PyObject
*
)
self
;
return
(
PyObject
*
)
self
;
}
}
#endif
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