mirror of
https://github.com/Relintai/gdnative_python.git
synced 2025-02-06 16:25:58 +01:00
Fix some naming issues.
This commit is contained in:
parent
cb7c27ab85
commit
aa56596f7d
@ -12,8 +12,8 @@ cdef class {{ t.py_pool }}:
|
|||||||
# Operators
|
# Operators
|
||||||
|
|
||||||
cdef inline bint operator_equal(self, {{ t.py_pool }} other)
|
cdef inline bint operator_equal(self, {{ t.py_pool }} other)
|
||||||
cdef inline {{ t.py_value }} operator_getitem(self, godot_int index)
|
cdef inline {{ t.py_value }} operator_getitem(self, pandemonium_int index)
|
||||||
cdef inline {{ t.py_pool }} operator_getslice(self, godot_int start, godot_int end, godot_int step)
|
cdef inline {{ t.py_pool }} operator_getslice(self, pandemonium_int start, pandemonium_int end, pandemonium_int step)
|
||||||
|
|
||||||
# Methods
|
# Methods
|
||||||
|
|
||||||
@ -22,8 +22,8 @@ cdef class {{ t.py_pool }}:
|
|||||||
cdef inline void append_array(self, {{ t.py_pool }} array)
|
cdef inline void append_array(self, {{ t.py_pool }} array)
|
||||||
cpdef inline void invert(self)
|
cpdef inline void invert(self)
|
||||||
cpdef inline void push_back(self, {{ t.py_value }} data)
|
cpdef inline void push_back(self, {{ t.py_value }} data)
|
||||||
cpdef inline void resize(self, godot_int size)
|
cpdef inline void resize(self, pandemonium_int size)
|
||||||
cdef inline godot_int size(self)
|
cdef inline pandemonium_int size(self)
|
||||||
|
|
||||||
|
|
||||||
@cython.final
|
@cython.final
|
||||||
|
@ -29,15 +29,15 @@ env.AppendUnique(LIBPATH=[Dir(".")])
|
|||||||
env.AppendUnique(CYTHON_COMPILE_DEPS=[libpythonscript])
|
env.AppendUnique(CYTHON_COMPILE_DEPS=[libpythonscript])
|
||||||
|
|
||||||
|
|
||||||
SConscript(["pandemoniummonium/SConscript"])
|
SConscript(["pandemonium/SConscript"])
|
||||||
|
|
||||||
|
|
||||||
# `_pandemonium_api.h` is only for internal use between _pandemoniummonium and pythonscript
|
# `_pandemonium_api.h` is only for internal use between _pandemonium and pythonscript
|
||||||
# libraries, hence no need to provide it as part of the release
|
# libraries, hence no need to provide it as part of the release
|
||||||
*mods, _ = env.CythonModule(
|
*mods, _ = env.CythonModule(
|
||||||
["_pandemoniummonium", "_pandemonium_api.h"],
|
["_pandemonium", "_pandemonium_api.h"],
|
||||||
[
|
[
|
||||||
"_pandemoniummonium.pyx",
|
"_pandemonium.pyx",
|
||||||
"_pandemonium_editor.pxi",
|
"_pandemonium_editor.pxi",
|
||||||
"_pandemonium_instance.pxi",
|
"_pandemonium_instance.pxi",
|
||||||
"_pandemonium_profiling.pxi",
|
"_pandemonium_profiling.pxi",
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
# `_pandemoniummonium` module contains all the callbacks needed by Pandemonium's Pluginscript
|
# `_pandemonium` module contains all the callbacks needed by Pandemonium's Pluginscript
|
||||||
# system to expose Python as a language to Pandemonium (see pythonscript.c for
|
# system to expose Python as a language to Pandemonium (see pythonscript.c for
|
||||||
# more on this).
|
# more on this).
|
||||||
# Hence there is no point of importing this module from Python given it
|
# Hence there is no point of importing this module from Python given it
|
||||||
# only expose C functions.
|
# only expose C functions.
|
||||||
# Beside this module depend on the `pandemoniummonium.hazmat` module so it would be a bad
|
# Beside this module depend on the `pandemonium.hazmat` module so it would be a bad
|
||||||
# idea to make the `pandemoniummonium` module depend on it...
|
# idea to make the `pandemonium` module depend on it...
|
||||||
include "_pandemonium_editor.pxi"
|
include "_pandemonium_editor.pxi"
|
||||||
include "_pandemonium_profiling.pxi"
|
include "_pandemonium_profiling.pxi"
|
||||||
include "_pandemonium_script.pxi"
|
include "_pandemonium_script.pxi"
|
||||||
include "_pandemonium_instance.pxi"
|
include "_pandemonium_instance.pxi"
|
||||||
include "_pandemonium_io.pxi"
|
include "_pandemonium_io.pxi"
|
||||||
|
|
||||||
from pandemoniummonium._hazmat.gdnative_api_struct cimport (
|
from pandemonium._hazmat.gdnative_api_struct cimport (
|
||||||
pandemonium_gdnative_init_options,
|
pandemonium_gdnative_init_options,
|
||||||
pandemonium_pluginscript_language_data,
|
pandemonium_pluginscript_language_data,
|
||||||
)
|
)
|
||||||
from pandemoniummonium._hazmat.internal cimport set_pythonscript_verbose, get_pythonscript_verbose
|
from pandemonium._hazmat.internal cimport set_pythonscript_verbose, get_pythonscript_verbose
|
||||||
from pandemoniummonium.builtins cimport GDString
|
from pandemonium.builtins cimport GDString
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# OS and ProjectSettings are singletons exposed as global python objects,
|
# OS and ProjectSettings are singletons exposed as global python objects,
|
||||||
# hence there are not available from a cimport
|
# hence there are not available from a cimport
|
||||||
from pandemoniummonium.bindings import OS, ProjectSettings
|
from pandemonium.bindings import OS, ProjectSettings
|
||||||
from pandemoniummonium._version import __version__ as pythonscript_version
|
from pandemonium._version import __version__ as pythonscript_version
|
||||||
|
|
||||||
|
|
||||||
def _setup_config_entry(name, default_value):
|
def _setup_config_entry(name, default_value):
|
||||||
@ -37,7 +37,7 @@ def _setup_config_entry(name, default_value):
|
|||||||
|
|
||||||
cdef api pandemonium_pluginscript_language_data *pythonscript_init() with gil:
|
cdef api pandemonium_pluginscript_language_data *pythonscript_init() with gil:
|
||||||
# Pass argv arguments
|
# Pass argv arguments
|
||||||
sys.argv = ["pandemoniummonium"] + [str(x) for x in OS.get_cmdline_args()]
|
sys.argv = ["pandemonium"] + [str(x) for x in OS.get_cmdline_args()]
|
||||||
|
|
||||||
# Update PYTHONPATH according to configuration
|
# Update PYTHONPATH according to configuration
|
||||||
pythonpath = str(_setup_config_entry("python_script/path", "res://;res://lib"))
|
pythonpath = str(_setup_config_entry("python_script/path", "res://;res://lib"))
|
||||||
|
@ -13,8 +13,8 @@ from pannemdniummonium._hazmat.gdnative_api_struct cimport (
|
|||||||
pandemonium_error,
|
pandemonium_error,
|
||||||
pandemonium_dictionary
|
pandemonium_dictionary
|
||||||
)
|
)
|
||||||
from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10
|
from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10
|
||||||
from pandemoniummonium._hazmat.conversion cimport (
|
from pandemonium._hazmat.conversion cimport (
|
||||||
pandemonium_string_to_pyobj,
|
pandemonium_string_to_pyobj,
|
||||||
pyobj_to_pandemonium_string,
|
pyobj_to_pandemonium_string,
|
||||||
pandemonium_variant_to_pyobj,
|
pandemonium_variant_to_pyobj,
|
||||||
@ -32,8 +32,8 @@ cdef api pandemonium_string pythonscript_get_template_source_code(
|
|||||||
else:
|
else:
|
||||||
class_name = pandemonium_string_to_pyobj(p_class_name)
|
class_name = pandemonium_string_to_pyobj(p_class_name)
|
||||||
cdef str base_class_name = pandemonium_string_to_pyobj(p_base_class_name)
|
cdef str base_class_name = pandemonium_string_to_pyobj(p_base_class_name)
|
||||||
cdef str src = f"""from pandemoniummonium import exposed, export
|
cdef str src = f"""from pandemonium import exposed, export
|
||||||
from pandemoniummonium import *
|
from pandemonium import *
|
||||||
|
|
||||||
|
|
||||||
@exposed
|
@exposed
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from libc.stddef cimport wchar_t
|
from libc.stddef cimport wchar_t
|
||||||
from cpython cimport Py_INCREF, Py_DECREF, PyObject
|
from cpython cimport Py_INCREF, Py_DECREF, PyObject
|
||||||
|
|
||||||
from pandemoniummonium._hazmat.gdnative_api_struct cimport (
|
from pandemonium._hazmat.gdnative_api_struct cimport (
|
||||||
pandemonium_string,
|
pandemonium_string,
|
||||||
pandemonium_string_name,
|
pandemonium_string_name,
|
||||||
pandemonium_bool,
|
pandemonium_bool,
|
||||||
@ -18,8 +18,8 @@ from pandemoniummonium._hazmat.gdnative_api_struct cimport (
|
|||||||
pandemonium_variant_call_error_error,
|
pandemonium_variant_call_error_error,
|
||||||
pandemonium_variant_type,
|
pandemonium_variant_type,
|
||||||
)
|
)
|
||||||
from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10
|
from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10
|
||||||
from pandemoniummonium._hazmat.conversion cimport (
|
from pandemonium._hazmat.conversion cimport (
|
||||||
pandemonium_variant_to_pyobj,
|
pandemonium_variant_to_pyobj,
|
||||||
pyobj_to_pandemonium_variant,
|
pyobj_to_pandemonium_variant,
|
||||||
pandemonium_string_name_to_pyobj,
|
pandemonium_string_name_to_pyobj,
|
||||||
|
@ -4,12 +4,12 @@ import traceback
|
|||||||
from io import TextIOBase
|
from io import TextIOBase
|
||||||
from threading import Lock
|
from threading import Lock
|
||||||
|
|
||||||
from pandemoniummonium._hazmat.conversion cimport (
|
from pandemonium._hazmat.conversion cimport (
|
||||||
pandemonium_string_to_pyobj,
|
pandemonium_string_to_pyobj,
|
||||||
pyobj_to_pandemonium_string,
|
pyobj_to_pandemonium_string,
|
||||||
pandemonium_variant_to_pyobj,
|
pandemonium_variant_to_pyobj,
|
||||||
)
|
)
|
||||||
from pandemoniummonium._hazmat.gdnative_api_struct cimport (
|
from pandemonium._hazmat.gdnative_api_struct cimport (
|
||||||
pandemonium_string,
|
pandemonium_string,
|
||||||
pandemonium_string_name,
|
pandemonium_string_name,
|
||||||
pandemonium_bool,
|
pandemonium_bool,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# cython: c_string_type=unicode, c_string_encoding=utf8
|
# cython: c_string_type=unicode, c_string_encoding=utf8
|
||||||
|
|
||||||
from pandemoniummonium._hazmat.gdnative_api_struct cimport (
|
from pandemonium._hazmat.gdnative_api_struct cimport (
|
||||||
pandemonium_pluginscript_language_data,
|
pandemonium_pluginscript_language_data,
|
||||||
pandemonium_pluginscript_profiling_data,
|
pandemonium_pluginscript_profiling_data,
|
||||||
)
|
)
|
||||||
from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10
|
from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
@ -4,7 +4,7 @@ import importlib
|
|||||||
|
|
||||||
from cpython.ref cimport PyObject
|
from cpython.ref cimport PyObject
|
||||||
|
|
||||||
from pandemoniummonium._hazmat.gdnative_api_struct cimport (
|
from pandemonium._hazmat.gdnative_api_struct cimport (
|
||||||
pandemonium_pluginscript_language_data,
|
pandemonium_pluginscript_language_data,
|
||||||
pandemonium_string,
|
pandemonium_string,
|
||||||
pandemonium_bool,
|
pandemonium_bool,
|
||||||
@ -23,26 +23,26 @@ from pandemoniummonium._hazmat.gdnative_api_struct cimport (
|
|||||||
PANDEMONIUM_METHOD_FLAG_FROM_SCRIPT,
|
PANDEMONIUM_METHOD_FLAG_FROM_SCRIPT,
|
||||||
PANDEMONIUM_METHOD_RPC_MODE_DISABLED,
|
PANDEMONIUM_METHOD_RPC_MODE_DISABLED,
|
||||||
)
|
)
|
||||||
from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10
|
from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10
|
||||||
from pandemoniummonium._hazmat.conversion cimport (
|
from pandemonium._hazmat.conversion cimport (
|
||||||
pandemonium_string_to_pyobj,
|
pandemonium_string_to_pyobj,
|
||||||
pyobj_to_pandemonium_string,
|
pyobj_to_pandemonium_string,
|
||||||
pyobj_to_pandemonium_string_name,
|
pyobj_to_pandemonium_string_name,
|
||||||
pytype_to_pandemonium_type,
|
pytype_to_pandemonium_type,
|
||||||
)
|
)
|
||||||
from pandemoniummonium._hazmat.internal cimport (
|
from pandemonium._hazmat.internal cimport (
|
||||||
get_pythonscript_verbose,
|
get_pythonscript_verbose,
|
||||||
get_exposed_class,
|
get_exposed_class,
|
||||||
set_exposed_class,
|
set_exposed_class,
|
||||||
destroy_exposed_class,
|
destroy_exposed_class,
|
||||||
)
|
)
|
||||||
from pandemoniummonium.bindings cimport _initialize_bindings, Object
|
from pandemonium.bindings cimport _initialize_bindings, Object
|
||||||
from pandemoniummonium.builtins cimport Array, Dictionary
|
from pandemonium.builtins cimport Array, Dictionary
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from pandemoniummonium.tags import ExportedField, SignalField
|
from pandemonium.tags import ExportedField, SignalField
|
||||||
|
|
||||||
|
|
||||||
cdef inline pandemonium_pluginscript_script_manifest _build_empty_script_manifest():
|
cdef inline pandemonium_pluginscript_script_manifest _build_empty_script_manifest():
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Public low-level APIs are exposed here
|
# Public low-level APIs are exposed here
|
||||||
|
|
||||||
from pandemoniummonium._hazmat cimport gdnative_api_struct
|
from pandemonium._hazmat cimport gdnative_api_struct
|
||||||
# Re-expose Pandemonium API with better names
|
# Re-expose Pandemonium API with better names
|
||||||
from pandemoniummonium._hazmat.gdapi cimport (
|
from pandemonium._hazmat.gdapi cimport (
|
||||||
pythonscript_gdapi10 as gdapi10,
|
pythonscript_gdapi10 as gdapi10,
|
||||||
pythonscript_gdapi11 as gdapi11,
|
pythonscript_gdapi11 as gdapi11,
|
||||||
pythonscript_gdapi12 as gdapi12,
|
pythonscript_gdapi12 as gdapi12,
|
||||||
|
Loading…
Reference in New Issue
Block a user