Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-09-19 05:05:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-19 05:12:21 +0300
commitbb3ec3ebafbc2c0e5d8530148a433242e0adad30 (patch)
treed30aaa3df2d03f90f6e7749bdc075445a5642045 /source/blender/python/mathutils/mathutils_Color.c
parent4c918efd44be11d47afc1efed684a15ad5579722 (diff)
BLI_utildefines: rename pointer conversion macros
Terms get/set don't make much sense when casting values. Name macros so the conversion is obvious, use common prefix for easier completion. - GET_INT_FROM_POINTER -> POINTER_AS_INT - SET_INT_IN_POINTER -> POINTER_FROM_INT - GET_UINT_FROM_POINTER -> POINTER_AS_UINT - SET_UINT_IN_POINTER -> POINTER_FROM_UINT
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Color.c')
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index 4c1163a6181..e97ed095b24 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -706,12 +706,12 @@ PyDoc_STRVAR(Color_channel_b_doc, "Blue color channel.\n\n:type: float");
static PyObject *Color_channel_get(ColorObject *self, void *type)
{
- return Color_item(self, GET_INT_FROM_POINTER(type));
+ return Color_item(self, POINTER_AS_INT(type));
}
static int Color_channel_set(ColorObject *self, PyObject *value, void *type)
{
- return Color_ass_item(self, GET_INT_FROM_POINTER(type), value);
+ return Color_ass_item(self, POINTER_AS_INT(type), value);
}
/* color channel (HSV), color.h/s/v */
@@ -722,7 +722,7 @@ PyDoc_STRVAR(Color_channel_hsv_v_doc, "HSV Value component in [0, 1].\n\n:type:
static PyObject *Color_channel_hsv_get(ColorObject *self, void *type)
{
float hsv[3];
- int i = GET_INT_FROM_POINTER(type);
+ int i = POINTER_AS_INT(type);
if (BaseMath_ReadCallback(self) == -1)
return NULL;
@@ -735,7 +735,7 @@ static PyObject *Color_channel_hsv_get(ColorObject *self, void *type)
static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void *type)
{
float hsv[3];
- int i = GET_INT_FROM_POINTER(type);
+ int i = POINTER_AS_INT(type);
float f = PyFloat_AsDouble(value);
if (f == -1 && PyErr_Occurred()) {