Stub slang module

This commit is contained in:
Kovid Goyal
2026-06-24 11:27:30 +05:30
parent 734ae16b1c
commit 657bb3e7aa
2 changed files with 49 additions and 0 deletions

30
shaders/compiler.cpp Normal file
View File

@@ -0,0 +1,30 @@
/*
* compiler.cpp
* Copyright (C) 2026 Kovid Goyal <kovid at kovidgoyal.net>
*
* Distributed under terms of the GPL3 license.
*/
#include <Python.h>
static char doc[] = "Compile shaders";
static PyMethodDef methods[] = {
{NULL} /* Sentinel */
};
static int
exec_module(PyObject *mod) { (void)mod; return 0; }
static PyModuleDef_Slot slots[] = { {Py_mod_exec, (void*)exec_module}, {0, NULL} };
static struct PyModuleDef module_def = {PyModuleDef_HEAD_INIT};
PyObject*
PyInit_slangc(void) {
module_def.m_name = "slangc";
module_def.m_slots = slots;
module_def.m_doc = doc;
module_def.m_methods = methods;
return PyModuleDef_Init(&module_def);
}