Nuitka
The Python compiler
Loading...
Searching...
No Matches
type_aliases.h
1// Copyright 2026, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
2
3#ifndef __NUITKA_TYPE_ALIASES_H__
4#define __NUITKA_TYPE_ALIASES_H__
5
6/* This file is included from another C file, help IDEs to still parse it on its own. */
7#ifdef __IDE_ONLY__
8#include "nuitka/prelude.h"
9#endif
10
11// Helpers for type aliases, type variables, and generic base classes.
12extern PyObject *MAKE_TYPE_ALIAS(PyObject *name, PyObject *type_params, PyObject *value, PyObject *module_name);
13extern PyObject *MAKE_TYPE_VAR(PyThreadState *tstate, PyObject *name);
14extern PyObject *MAKE_TYPE_VAR_TUPLE(PyThreadState *tstate, PyObject *name);
15extern PyObject *MAKE_PARAM_SPEC(PyThreadState *tstate, PyObject *name);
16extern PyObject *MAKE_TYPE_GENERIC(PyThreadState *tstate, PyObject *params);
17
18#endif
19
20// Part of "Nuitka", an optimizing Python compiler that is compatible and
21// integrates with CPython, but also works on its own.
22//
23// Licensed under the GNU Affero General Public License, Version 3 (the "License");
24// you may not use this file except in compliance with the License.
25// You may obtain a copy of the License at
26//
27// http://www.gnu.org/licenses/agpl.txt
28//
29// Unless required by applicable law or agreed to in writing, software
30// distributed under the License is distributed on an "AS IS" BASIS,
31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32// See the License for the specific language governing permissions and
33// limitations under the License.