Panda3D

Loading...
Searching...
No Matches
paramPyObject.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file paramPyObject.I
10 * @author rdb
11 * @date 2021-03-01
12 */
13
14#include "paramPyObject.h"
15
16/**
17 * Increments the reference count. Assumes the GIL is held.
18 */
19INLINE ParamPyObject::
20ParamPyObject(PyObject *value) : _value(value) {
21 Py_INCREF(value);
22}
23
24/**
25 * Returns a new reference to the stored value.
26 */
27INLINE PyObject *ParamPyObject::
28get_value() const {
29 Py_INCREF(_value);
30 return _value;
31}
paramPyObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.