2017-01-12 23:38:51 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Stanislav Yudin <stan@endlessinsomnia.com>
|
2019-02-22 16:57:28 +01:00
|
|
|
* Copyright (c) 2017-2019 Joris Vink <joris@coders.se>
|
2017-01-12 23:38:51 +01:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __H_PYTHON_H
|
|
|
|
#define __H_PYTHON_H
|
|
|
|
|
2017-01-25 22:41:57 +01:00
|
|
|
#undef _POSIX_C_SOURCE
|
|
|
|
#undef _XOPEN_SOURCE
|
|
|
|
|
2017-01-12 23:38:51 +01:00
|
|
|
#include <Python.h>
|
|
|
|
|
|
|
|
void kore_python_init(void);
|
2018-11-12 09:01:05 +01:00
|
|
|
void kore_python_preinit(void);
|
2017-01-12 23:38:51 +01:00
|
|
|
void kore_python_cleanup(void);
|
2018-10-15 20:18:54 +02:00
|
|
|
void kore_python_coro_run(void);
|
2018-10-26 19:19:47 +02:00
|
|
|
void kore_python_proc_reap(void);
|
2017-01-12 23:38:51 +01:00
|
|
|
void kore_python_path(const char *);
|
2018-10-15 20:18:54 +02:00
|
|
|
void kore_python_coro_delete(void *);
|
2018-10-16 13:16:36 +02:00
|
|
|
void kore_python_log_error(const char *);
|
2017-01-12 23:38:51 +01:00
|
|
|
|
|
|
|
PyObject *kore_python_callable(PyObject *, const char *);
|
|
|
|
|
2019-06-12 23:35:43 +02:00
|
|
|
#if !defined(KORE_SINGLE_BINARY)
|
|
|
|
extern const char *kore_pymodule;
|
|
|
|
#endif
|
|
|
|
|
2017-01-12 23:38:51 +01:00
|
|
|
extern struct kore_module_functions kore_python_module;
|
|
|
|
extern struct kore_runtime kore_python_runtime;
|
|
|
|
|
|
|
|
#endif
|