From aa56596f7d4f60ae7f5194046b91e30e98fb5474 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 2 Jun 2023 11:42:53 +0200 Subject: [PATCH] Fix some naming issues. --- .../pool_x_array.tmpl.pxd | 8 ++++---- pythonscript/SConscript | 8 ++++---- pythonscript/_pandemonium.pyx | 18 +++++++++--------- pythonscript/_pandemonium_editor.pxi | 8 ++++---- pythonscript/_pandemonium_instance.pxi | 6 +++--- pythonscript/_pandemonium_io.pxi | 4 ++-- pythonscript/_pandemonium_profiling.pxi | 4 ++-- pythonscript/_pandemonium_script.pxi | 14 +++++++------- pythonscript/pandemonium/hazmat.pxd | 4 ++-- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/generation/pool_arrays_templates/pool_x_array.tmpl.pxd b/generation/pool_arrays_templates/pool_x_array.tmpl.pxd index fe24773..6970054 100644 --- a/generation/pool_arrays_templates/pool_x_array.tmpl.pxd +++ b/generation/pool_arrays_templates/pool_x_array.tmpl.pxd @@ -12,8 +12,8 @@ cdef class {{ t.py_pool }}: # Operators 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_pool }} operator_getslice(self, godot_int start, godot_int end, godot_int step) + cdef inline {{ t.py_value }} operator_getitem(self, pandemonium_int index) + cdef inline {{ t.py_pool }} operator_getslice(self, pandemonium_int start, pandemonium_int end, pandemonium_int step) # Methods @@ -22,8 +22,8 @@ cdef class {{ t.py_pool }}: cdef inline void append_array(self, {{ t.py_pool }} array) cpdef inline void invert(self) cpdef inline void push_back(self, {{ t.py_value }} data) - cpdef inline void resize(self, godot_int size) - cdef inline godot_int size(self) + cpdef inline void resize(self, pandemonium_int size) + cdef inline pandemonium_int size(self) @cython.final diff --git a/pythonscript/SConscript b/pythonscript/SConscript index 6f52934..073190f 100644 --- a/pythonscript/SConscript +++ b/pythonscript/SConscript @@ -29,15 +29,15 @@ env.AppendUnique(LIBPATH=[Dir(".")]) 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 *mods, _ = env.CythonModule( - ["_pandemoniummonium", "_pandemonium_api.h"], + ["_pandemonium", "_pandemonium_api.h"], [ - "_pandemoniummonium.pyx", + "_pandemonium.pyx", "_pandemonium_editor.pxi", "_pandemonium_instance.pxi", "_pandemonium_profiling.pxi", diff --git a/pythonscript/_pandemonium.pyx b/pythonscript/_pandemonium.pyx index 72ee168..27a5408 100644 --- a/pythonscript/_pandemonium.pyx +++ b/pythonscript/_pandemonium.pyx @@ -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 # more on this). # Hence there is no point of importing this module from Python given it # only expose C functions. -# Beside this module depend on the `pandemoniummonium.hazmat` module so it would be a bad -# idea to make the `pandemoniummonium` module depend on it... +# Beside this module depend on the `pandemonium.hazmat` module so it would be a bad +# idea to make the `pandemonium` module depend on it... include "_pandemonium_editor.pxi" include "_pandemonium_profiling.pxi" include "_pandemonium_script.pxi" include "_pandemonium_instance.pxi" include "_pandemonium_io.pxi" -from pandemoniummonium._hazmat.gdnative_api_struct cimport ( +from pandemonium._hazmat.gdnative_api_struct cimport ( pandemonium_gdnative_init_options, pandemonium_pluginscript_language_data, ) -from pandemoniummonium._hazmat.internal cimport set_pythonscript_verbose, get_pythonscript_verbose -from pandemoniummonium.builtins cimport GDString +from pandemonium._hazmat.internal cimport set_pythonscript_verbose, get_pythonscript_verbose +from pandemonium.builtins cimport GDString import sys # OS and ProjectSettings are singletons exposed as global python objects, # hence there are not available from a cimport -from pandemoniummonium.bindings import OS, ProjectSettings -from pandemoniummonium._version import __version__ as pythonscript_version +from pandemonium.bindings import OS, ProjectSettings +from pandemonium._version import __version__ as pythonscript_version 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: # 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 pythonpath = str(_setup_config_entry("python_script/path", "res://;res://lib")) diff --git a/pythonscript/_pandemonium_editor.pxi b/pythonscript/_pandemonium_editor.pxi index 6e2a271..b4bfd23 100644 --- a/pythonscript/_pandemonium_editor.pxi +++ b/pythonscript/_pandemonium_editor.pxi @@ -13,8 +13,8 @@ from pannemdniummonium._hazmat.gdnative_api_struct cimport ( pandemonium_error, pandemonium_dictionary ) -from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from pandemoniummonium._hazmat.conversion cimport ( +from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemonium._hazmat.conversion cimport ( pandemonium_string_to_pyobj, pyobj_to_pandemonium_string, pandemonium_variant_to_pyobj, @@ -32,8 +32,8 @@ cdef api pandemonium_string pythonscript_get_template_source_code( else: class_name = pandemonium_string_to_pyobj(p_class_name) cdef str base_class_name = pandemonium_string_to_pyobj(p_base_class_name) - cdef str src = f"""from pandemoniummonium import exposed, export -from pandemoniummonium import * + cdef str src = f"""from pandemonium import exposed, export +from pandemonium import * @exposed diff --git a/pythonscript/_pandemonium_instance.pxi b/pythonscript/_pandemonium_instance.pxi index a7df35f..2399a9d 100644 --- a/pythonscript/_pandemonium_instance.pxi +++ b/pythonscript/_pandemonium_instance.pxi @@ -3,7 +3,7 @@ from libc.stddef cimport wchar_t 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_name, pandemonium_bool, @@ -18,8 +18,8 @@ from pandemoniummonium._hazmat.gdnative_api_struct cimport ( pandemonium_variant_call_error_error, pandemonium_variant_type, ) -from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from pandemoniummonium._hazmat.conversion cimport ( +from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemonium._hazmat.conversion cimport ( pandemonium_variant_to_pyobj, pyobj_to_pandemonium_variant, pandemonium_string_name_to_pyobj, diff --git a/pythonscript/_pandemonium_io.pxi b/pythonscript/_pandemonium_io.pxi index 718eabd..7c9a07b 100644 --- a/pythonscript/_pandemonium_io.pxi +++ b/pythonscript/_pandemonium_io.pxi @@ -4,12 +4,12 @@ import traceback from io import TextIOBase from threading import Lock -from pandemoniummonium._hazmat.conversion cimport ( +from pandemonium._hazmat.conversion cimport ( pandemonium_string_to_pyobj, pyobj_to_pandemonium_string, pandemonium_variant_to_pyobj, ) -from pandemoniummonium._hazmat.gdnative_api_struct cimport ( +from pandemonium._hazmat.gdnative_api_struct cimport ( pandemonium_string, pandemonium_string_name, pandemonium_bool, diff --git a/pythonscript/_pandemonium_profiling.pxi b/pythonscript/_pandemonium_profiling.pxi index 0634036..33c0dc1 100644 --- a/pythonscript/_pandemonium_profiling.pxi +++ b/pythonscript/_pandemonium_profiling.pxi @@ -1,10 +1,10 @@ # 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_profiling_data, ) -from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 import sys from collections import defaultdict diff --git a/pythonscript/_pandemonium_script.pxi b/pythonscript/_pandemonium_script.pxi index a129cae..39d534e 100644 --- a/pythonscript/_pandemonium_script.pxi +++ b/pythonscript/_pandemonium_script.pxi @@ -4,7 +4,7 @@ import importlib from cpython.ref cimport PyObject -from pandemoniummonium._hazmat.gdnative_api_struct cimport ( +from pandemonium._hazmat.gdnative_api_struct cimport ( pandemonium_pluginscript_language_data, pandemonium_string, pandemonium_bool, @@ -23,26 +23,26 @@ from pandemoniummonium._hazmat.gdnative_api_struct cimport ( PANDEMONIUM_METHOD_FLAG_FROM_SCRIPT, PANDEMONIUM_METHOD_RPC_MODE_DISABLED, ) -from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from pandemoniummonium._hazmat.conversion cimport ( +from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemonium._hazmat.conversion cimport ( pandemonium_string_to_pyobj, pyobj_to_pandemonium_string, pyobj_to_pandemonium_string_name, pytype_to_pandemonium_type, ) -from pandemoniummonium._hazmat.internal cimport ( +from pandemonium._hazmat.internal cimport ( get_pythonscript_verbose, get_exposed_class, set_exposed_class, destroy_exposed_class, ) -from pandemoniummonium.bindings cimport _initialize_bindings, Object -from pandemoniummonium.builtins cimport Array, Dictionary +from pandemonium.bindings cimport _initialize_bindings, Object +from pandemonium.builtins cimport Array, Dictionary import inspect import traceback -from pandemoniummonium.tags import ExportedField, SignalField +from pandemonium.tags import ExportedField, SignalField cdef inline pandemonium_pluginscript_script_manifest _build_empty_script_manifest(): diff --git a/pythonscript/pandemonium/hazmat.pxd b/pythonscript/pandemonium/hazmat.pxd index eafcd79..c899291 100644 --- a/pythonscript/pandemonium/hazmat.pxd +++ b/pythonscript/pandemonium/hazmat.pxd @@ -1,8 +1,8 @@ # 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 -from pandemoniummonium._hazmat.gdapi cimport ( +from pandemonium._hazmat.gdapi cimport ( pythonscript_gdapi10 as gdapi10, pythonscript_gdapi11 as gdapi11, pythonscript_gdapi12 as gdapi12,