1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 11:56:38 +02:00

core: remove directory "src/plugins/scripts", move script plugins in "src/plugins"

This commit is contained in:
Sebastien Helleu
2012-08-02 22:28:43 +02:00
parent e41595833a
commit 57eb513547
52 changed files with 5055 additions and 5096 deletions
+31
View File
@@ -0,0 +1,31 @@
#
# Copyright (C) 2003-2012 Sebastien Helleu <flashcode@flashtux.org>
#
# This file is part of WeeChat, the extensible chat client.
#
# WeeChat is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WeeChat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
ADD_LIBRARY(python MODULE weechat-python.c weechat-python.h
weechat-python-api.c weechat-python-api.h)
SET_TARGET_PROPERTIES(python PROPERTIES PREFIX "")
IF(PYTHON_FOUND)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PYTHON_LFLAGS}")
TARGET_LINK_LIBRARIES(python ${PYTHON_LIBRARY} weechat_plugins_scripts)
ENDIF(PYTHON_FOUND)
INSTALL(TARGETS python LIBRARY DESTINATION ${LIBDIR}/plugins)
+33
View File
@@ -0,0 +1,33 @@
#
# Copyright (C) 2003-2012 Sebastien Helleu <flashcode@flashtux.org>
#
# This file is part of WeeChat, the extensible chat client.
#
# WeeChat is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WeeChat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PYTHON_CFLAGS)
libdir = ${weechat_libdir}/plugins
lib_LTLIBRARIES = python.la
python_la_SOURCES = weechat-python.c \
weechat-python.h \
weechat-python-api.c \
weechat-python-api.h
python_la_LDFLAGS = -module
python_la_LIBADD = ../lib_weechat_plugins_scripts.la $(PYTHON_LFLAGS)
EXTRA_DIST = CMakeLists.txt
File diff suppressed because it is too large Load Diff
+32
View File
@@ -0,0 +1,32 @@
/*
* Copyright (C) 2003-2012 Sebastien Helleu <flashcode@flashtux.org>
* Copyright (C) 2005-2007 Emmanuel Bouthenot <kolter@openics.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_PYTHON_API_H
#define __WEECHAT_PYTHON_API_H 1
extern PyMethodDef weechat_python_funcs[];
extern int weechat_python_api_buffer_input_data_cb (void *data,
struct t_gui_buffer *buffer,
const char *input_data);
extern int weechat_python_api_buffer_close_cb (void *data,
struct t_gui_buffer *buffer);
#endif /* __WEECHAT_PYTHON_API_H */
File diff suppressed because it is too large Load Diff
+53
View File
@@ -0,0 +1,53 @@
/*
* Copyright (C) 2003-2012 Sebastien Helleu <flashcode@flashtux.org>
* Copyright (C) 2005-2007 Emmanuel Bouthenot <kolter@openics.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_PYTHON_H
#define __WEECHAT_PYTHON_H 1
#define weechat_plugin weechat_python_plugin
#define PYTHON_PLUGIN_NAME "python"
#define PYTHON_CURRENT_SCRIPT_NAME ((python_current_script) ? python_current_script->name : "-")
/* define some bytes functions for old python (<= 2.5) */
#if PY_VERSION_HEX < 0x02060000
#define PyBytes_AsString PyString_AsString
#define PyBytes_Check PyString_Check
#define PyBytes_FromString PyString_FromString
#define PyUnicode_FromString PyString_FromString
#endif
extern struct t_weechat_plugin *weechat_python_plugin;
extern int python_quiet;
extern struct t_plugin_script *python_scripts;
extern struct t_plugin_script *last_python_script;
extern struct t_plugin_script *python_current_script;
extern struct t_plugin_script *python_registered_script;
extern const char *python_current_script_filename;
extern PyObject *weechat_python_hashtable_to_dict (struct t_hashtable *hashtable);
extern struct t_hashtable *weechat_python_dict_to_hashtable (PyObject *dict,
int hashtable_size);
extern void *weechat_python_exec (struct t_plugin_script *script,
int ret_type, const char *function,
char *format, void **argv);
#endif /* __WEECHAT_PYTHON_H */