1
// SPDX-License-Identifier: LGPL-2.1-or-later
3
/***************************************************************************
4
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
5
* Copyright (c) 2023 Mario Passaglia <mpassaglia[at]cbc.uba.ar> *
7
* This file is part of FreeCAD. *
9
* FreeCAD is free software: you can redistribute it and/or modify it *
10
* under the terms of the GNU Lesser General Public License as *
11
* published by the Free Software Foundation, either version 2.1 of the *
12
* License, or (at your option) any later version. *
14
* FreeCAD is distributed in the hope that it will be useful, but *
15
* WITHOUT ANY WARRANTY; without even the implied warranty of *
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
17
* Lesser General Public License for more details. *
19
* You should have received a copy of the GNU Lesser General Public *
20
* License along with FreeCAD. If not, see *
21
* <https://www.gnu.org/licenses/>. *
23
**************************************************************************/
25
#include "PreCompiled.h"
26
#include <CXX/Extensions.hxx>
28
#include <Base/PythonTypeExt.h>
33
PythonTypeExt::PythonTypeExt(Py::PythonType& type)
37
Py::PythonType& PythonTypeExt::set_tp_descr_get(PyObject* (*tp_descr_get)(PyObject* self,
41
pytype.type_object()->tp_descr_get = tp_descr_get;
47
PythonTypeExt::set_tp_descr_set(int (*tp_descr_set)(PyObject* self, PyObject* obj, PyObject* value))
49
pytype.type_object()->tp_descr_set = tp_descr_set;