Nuitka
The Python compiler
Loading...
Searching...
No Matches
bytes.h
1// Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
2
3#ifndef __NUITKA_HELPER_BYTES_H__
4#define __NUITKA_HELPER_BYTES_H__
5
6#if PYTHON_VERSION >= 0x3a0
7#define NUITKA_BYTES_HAS_FREELIST 1
8extern PyObject *Nuitka_Bytes_FromStringAndSize(const char *data, Py_ssize_t size);
9#else
10#define NUITKA_BYTES_HAS_FREELIST 0
11#define Nuitka_Bytes_FromStringAndSize PyBytes_FromStringAndSize
12#endif
13
14#endif
15// Part of "Nuitka", an optimizing Python compiler that is compatible and
16// integrates with CPython, but also works on its own.
17//
18// Licensed under the Apache License, Version 2.0 (the "License");
19// you may not use this file except in compliance with the License.
20// You may obtain a copy of the License at
21//
22// http://www.apache.org/licenses/LICENSE-2.0
23//
24// Unless required by applicable law or agreed to in writing, software
25// distributed under the License is distributed on an "AS IS" BASIS,
26// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27// See the License for the specific language governing permissions and
28// limitations under the License.