We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
scripts/gdextension_cython_preprocessor.py
# godot_extension: generate_module_code()
1 parent 4b2c3b1 commit 71acc21Copy full SHA for 71acc21
scripts/gdextension_cython_preprocessor.py
@@ -262,7 +262,7 @@ def extract_classes_from_code(raw_code_lines: list[str]) -> ModuleDef:
262
current_class.inject_code_at_line = i
263
264
elif pragma == INJECT_MODULE_CODE_PRAGMA:
265
- if current_class is not None:
+ if not line.startswith("#"): # Detect unexpected indentation
266
raise RuntimeError(
267
f"Line {i + 1}: `# godot_extension: {pragma}` must be at module level (i.e. not within class/function definition)"
268
)
0 commit comments