Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ COPTS = [
"//tools/config:linux-x86_64": [
"-DAUDIO",
"-DVIDEO",
"-DPYTHON",
"-DTOX_EXPERIMENTAL",
],
"//conditions:default": [],
}) + select({
"//tools/config:linux-x86_64": ["-DPYTHON"],
"//tools/config:linux-x86_64-no-python": [],
"//conditions:default": [],
})

cc_library(
Expand Down Expand Up @@ -50,11 +53,14 @@ cc_library(
"//tools/config:linux-x86_64": [
"@libvpx",
"@openal",
"@python3//:python",
"@x11",
"@xproto",
],
"//conditions:default": [],
}) + select({
"//tools/config:linux-x86_64": ["@python3//:python"],
"//tools/config:linux-x86_64-no-python": [],
"//conditions:default": [],
}),
)

Expand All @@ -74,10 +80,13 @@ cc_binary(
"//tools/config:linux-x86_64": [
"@libvpx",
"@openal",
"@python3//:python",
"@x11",
],
"//conditions:default": [],
}) + select({
"//tools/config:linux-x86_64": ["@python3//:python"],
"//tools/config:linux-x86_64-no-python": [],
"//conditions:default": [],
}),
)

Expand All @@ -93,6 +102,7 @@ cc_test(
name = "line_info_test",
size = "small",
srcs = ["src/line_info_test.cc"],
linkstatic = True,
tags = ["no-windows"],
deps = [
":libtoxic",
Expand All @@ -105,6 +115,7 @@ cc_test(
name = "misc_tools_test",
size = "small",
srcs = ["src/misc_tools_test.cc"],
linkstatic = True,
tags = ["no-windows"],
deps = [
":libtoxic",
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static void load_groups(Toxic *toxic)

Tox *tox = toxic->tox;

size_t numgroups = tox_group_get_number_groups(tox);
size_t numgroups = tox_group_get_group_list_size(tox);

for (size_t i = 0; i < numgroups; ++i) {
if (init_groupchat_win(toxic, i, NULL, 0, Group_Join_Type_Load) != 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/python_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void init_python(Toxic *toxic)
PyEval_SaveThread();
}

void run_python(FILE *fp, char *path)
void run_python(FILE *fp, const char *path)
{
PyGILState_STATE gstate = PyGILState_Ensure();

Expand Down
2 changes: 1 addition & 1 deletion src/python_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
PyMODINIT_FUNC PyInit_toxic_api(void);
void terminate_python(void);
void init_python(Toxic *toxic);
void run_python(FILE *fp, char *path);
void run_python(FILE *fp, const char *path);
int do_python_command(int num_args, char (*args)[MAX_STR_SIZE]);
int python_num_registered_handlers(void);
int python_help_max_width(void);
Expand Down
Loading