X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fpython-plugin-provider%2Fpython-plugin-provider.c;h=e6e31099713393acfb35e864529ad581bd0a7193;hb=6375b9429f8332f3eacc2ec795aa1924c73d9cc8;hp=11a7482133a5f590999a85ccea71ba42236d8720;hpb=d5becf105cb8ce65158c78db52be641c37cb6d32;p=babeltrace.git diff --git a/src/python-plugin-provider/python-plugin-provider.c b/src/python-plugin-provider/python-plugin-provider.c index 11a74821..e6e31099 100644 --- a/src/python-plugin-provider/python-plugin-provider.c +++ b/src/python-plugin-provider/python-plugin-provider.c @@ -1,27 +1,9 @@ /* - * python-plugin-provider.c - * - * Babeltrace Python plugin provider + * SPDX-License-Identifier: MIT * * Copyright 2017 Philippe Proulx * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Babeltrace Python plugin provider */ #define BT_LOG_TAG "LIB/PLUGIN-PY" @@ -31,10 +13,10 @@ #include "common/macros.h" #include "compat/compiler.h" -#include +#include #include "lib/plugin/plugin.h" #include -#include +#include #include "lib/graph/component-class.h" #include "py-common/py-common.h" #include @@ -49,7 +31,7 @@ #define PYTHON_PLUGIN_FILE_EXT ".py" #define PYTHON_PLUGIN_FILE_EXT_LEN (sizeof(PYTHON_PLUGIN_FILE_EXT) - 1) -enum python_state { +static enum python_state { /* init_python() not called yet */ PYTHON_STATE_NOT_INITED, @@ -104,7 +86,7 @@ void log_python_traceback(int log_level) } BT_LOG_WRITE(log_level, BT_LOG_TAG, - "Exception occured: Python traceback:\n%s", exc->str); + "Exception occurred: Python traceback:\n%s", exc->str); } end: @@ -143,7 +125,7 @@ int init_python(void) ret = BT_FUNC_STATUS_ERROR; goto end; default: - abort(); + bt_common_abort(); } /* @@ -589,7 +571,7 @@ int bt_plugin_from_python_plugin_info(PyObject *plugin_info, bt_plugin_get_name(*plugin_out), comp_class, bt_component_class_get_name(comp_class), - bt_component_class_type_string( + bt_common_component_class_type_string( bt_component_class_get_type(comp_class))); goto error; }