Merge branch 'master' into blender2.8
This commit is contained in:
commit
2530ae6c74
|
@ -24,7 +24,6 @@
|
|||
* \ingroup pygen
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __PY_CAPI_UTILS_H__
|
||||
#define __PY_CAPI_UTILS_H__
|
||||
|
||||
|
@ -103,8 +102,8 @@ uint64_t PyC_Long_AsU64(PyObject *value);
|
|||
#endif
|
||||
|
||||
/* inline so type signatures match as expected */
|
||||
BLI_INLINE int32_t PyC_Long_AsI32(PyObject *value) { return (int32_t)_PyLong_AsInt(value); }
|
||||
BLI_INLINE int64_t PyC_Long_AsI64(PyObject *value) { return (int64_t)PyLong_AsLongLong(value); }
|
||||
BLI_INLINE uint64_t PyC_Long_AsU64(PyObject *value) { return (uint64_t)PyLong_AsUnsignedLongLong(value); }
|
||||
Py_LOCAL_INLINE(int32_t) PyC_Long_AsI32(PyObject *value) { return (int32_t)_PyLong_AsInt(value); }
|
||||
Py_LOCAL_INLINE(int64_t) PyC_Long_AsI64(PyObject *value) { return (int64_t)PyLong_AsLongLong(value); }
|
||||
Py_LOCAL_INLINE(uint64_t) PyC_Long_AsU64(PyObject *value) { return (uint64_t)PyLong_AsUnsignedLongLong(value); }
|
||||
|
||||
#endif /* __PY_CAPI_UTILS_H__ */
|
||||
|
|
|
@ -42,10 +42,10 @@ extern "C" {
|
|||
|
||||
/* wrap Py_INCREF & return the result,
|
||||
* use sparingly to avoid comma operator or temp var assignment */
|
||||
BLI_INLINE PyObject *Py_INCREF_RET(PyObject *op) { Py_INCREF(op); return op; }
|
||||
Py_LOCAL_INLINE(PyObject *)Py_INCREF_RET(PyObject *op) { Py_INCREF(op); return op; }
|
||||
|
||||
/* append & transfer ownership to the list, avoids inline Py_DECREF all over (which is quite a large macro) */
|
||||
BLI_INLINE int PyList_APPEND(PyObject *op, PyObject *v)
|
||||
Py_LOCAL_INLINE(int) PyList_APPEND(PyObject *op, PyObject *v)
|
||||
{
|
||||
int ret = PyList_Append(op, v);
|
||||
Py_DecRef(v);
|
||||
|
|
|
@ -73,7 +73,7 @@ typedef struct {
|
|||
} BPy_Library;
|
||||
|
||||
static PyObject *bpy_lib_load(PyObject *self, PyObject *args, PyObject *kwds);
|
||||
static PyObject *bpy_lib_enter(BPy_Library *self, PyObject *args);
|
||||
static PyObject *bpy_lib_enter(BPy_Library *self);
|
||||
static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *args);
|
||||
static PyObject *bpy_lib_dir(BPy_Library *self);
|
||||
|
||||
|
@ -237,7 +237,7 @@ static PyObject *_bpy_names(BPy_Library *self, int blocktype)
|
|||
return list;
|
||||
}
|
||||
|
||||
static PyObject *bpy_lib_enter(BPy_Library *self, PyObject *UNUSED(args))
|
||||
static PyObject *bpy_lib_enter(BPy_Library *self)
|
||||
{
|
||||
PyObject *ret;
|
||||
BPy_Library *self_from;
|
||||
|
|
Loading…
Reference in New Issue