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>2020-02-20 07:38:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-20 07:40:05 +0300
commit2a6df7dfe5ae9c25780166771c56ff921cc90f63 (patch)
treead638ee71b52f5915b937bf538051f49b0ac120b /source/blender/python/intern
parent1e3ffd1f872b1a52a5c392b135c29ae71744137d (diff)
Cleanup: use named unsigned types in the Python API
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_app.c2
-rw-r--r--source/blender/python/intern/bpy_app_translations.c4
-rw-r--r--source/blender/python/intern/bpy_interface.c4
-rw-r--r--source/blender/python/intern/bpy_intern_string.c4
-rw-r--r--source/blender/python/intern/bpy_rna.c12
-rw-r--r--source/blender/python/intern/bpy_rna.h12
-rw-r--r--source/blender/python/intern/bpy_rna_array.c4
-rw-r--r--source/blender/python/intern/bpy_rna_id_collection.c2
8 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index b6784f2cdc2..9b7842460b5 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -66,7 +66,7 @@
#ifdef BUILD_DATE
extern char build_date[];
extern char build_time[];
-extern unsigned long build_commit_timestamp;
+extern ulong build_commit_timestamp;
extern char build_commit_date[];
extern char build_commit_time[];
extern char build_hash[];
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index 2e88a9ccca7..54699663b91 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -80,10 +80,10 @@ static GHashKey *_ghashutil_keyalloc(const void *msgctxt, const void *msgid)
return key;
}
-static unsigned int _ghashutil_keyhash(const void *ptr)
+static uint _ghashutil_keyhash(const void *ptr)
{
const GHashKey *key = ptr;
- unsigned int hash = BLI_ghashutil_strhash(key->msgctxt);
+ uint hash = BLI_ghashutil_strhash(key->msgctxt);
return hash ^ BLI_ghashutil_strhash(key->msgid);
}
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 28afab1a6eb..1e1a070208c 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -1040,12 +1040,12 @@ bool BPY_string_is_keyword(const char *str)
/* EVIL, define text.c functions here... */
/* BKE_text.h */
-int text_check_identifier_unicode(const unsigned int ch)
+int text_check_identifier_unicode(const uint ch)
{
return (ch < 255 && text_check_identifier((char)ch)) || Py_UNICODE_ISALNUM(ch);
}
-int text_check_identifier_nodigit_unicode(const unsigned int ch)
+int text_check_identifier_nodigit_unicode(const uint ch)
{
return (ch < 255 && text_check_identifier_nodigit((char)ch)) || Py_UNICODE_ISALPHA(ch);
}
diff --git a/source/blender/python/intern/bpy_intern_string.c b/source/blender/python/intern/bpy_intern_string.c
index 141f03c22aa..1f3148ca809 100644
--- a/source/blender/python/intern/bpy_intern_string.c
+++ b/source/blender/python/intern/bpy_intern_string.c
@@ -49,7 +49,7 @@ PyObject *bpy_intern_str_unregister;
void bpy_intern_string_init(void)
{
- unsigned int i = 0;
+ uint i = 0;
#define BPY_INTERN_STR(var, str) \
{ \
@@ -81,7 +81,7 @@ void bpy_intern_string_init(void)
void bpy_intern_string_exit(void)
{
- unsigned int i = ARRAY_SIZE(bpy_intern_str_arr);
+ uint i = ARRAY_SIZE(bpy_intern_str_arr);
while (i--) {
Py_DECREF(bpy_intern_str_arr[i]);
}
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 6c2896db703..ff81b4a15ff 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -130,8 +130,8 @@ struct gc_generation {
static void id_release_gc(struct ID *id)
{
- unsigned int j;
- // unsigned int i = 0;
+ uint j;
+ // uint i = 0;
for (j = 0; j < 3; j++) {
/* Hack below to get the 2 other lists from _PyGC_generation0 that are normally not exposed. */
PyGC_Head *gen = (PyGC_Head *)(((char *)_PyGC_generation0) + (sizeof(gc_generation) * j));
@@ -382,7 +382,7 @@ static short pyrna_rotation_euler_order_get(PointerRNA *ptr,
PropertyRNA **r_prop_eul_order);
/* bpyrna vector/euler/quat callbacks. */
-static unsigned char mathutils_rna_array_cb_index = -1; /* Index for our callbacks. */
+static uchar mathutils_rna_array_cb_index = -1; /* Index for our callbacks. */
/* Subtype not used much yet. */
# define MATHUTILS_CB_SUBTYPE_EUL 0
@@ -532,7 +532,7 @@ static Mathutils_Callback mathutils_rna_array_cb = {
};
/* bpyrna matrix callbacks */
-static unsigned char mathutils_rna_matrix_cb_index = -1; /* Index for our callbacks. */
+static uchar mathutils_rna_matrix_cb_index = -1; /* Index for our callbacks. */
static int mathutils_rna_matrix_get(BaseMathObject *bmo, int UNUSED(subtype))
{
@@ -1302,7 +1302,7 @@ BLI_bitmap *pyrna_set_to_enum_bitmap(const EnumPropertyItem *items,
if (type_size == 2) {
union {
signed short as_signed;
- unsigned short as_unsigned;
+ ushort as_unsigned;
} ret_convert;
ret_convert.as_signed = (signed short)ret;
index = (int)ret_convert.as_unsigned;
@@ -1310,7 +1310,7 @@ BLI_bitmap *pyrna_set_to_enum_bitmap(const EnumPropertyItem *items,
else if (type_size == 1) {
union {
signed char as_signed;
- unsigned char as_unsigned;
+ uchar as_unsigned;
} ret_convert;
ret_convert.as_signed = (signed char)ret;
index = (int)ret_convert.as_unsigned;
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index cf6bd54d8a5..5899c1659b5 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -202,12 +202,12 @@ int pyrna_pydict_to_props(PointerRNA *ptr,
const char *error_prefix);
PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop);
-unsigned int *pyrna_set_to_enum_bitmap(const struct EnumPropertyItem *items,
- PyObject *value,
- int type_size,
- bool type_convert_sign,
- int bitmap_size,
- const char *error_prefix);
+uint *pyrna_set_to_enum_bitmap(const struct EnumPropertyItem *items,
+ PyObject *value,
+ int type_size,
+ bool type_convert_sign,
+ int bitmap_size,
+ const char *error_prefix);
PyObject *pyrna_enum_bitfield_to_py(const struct EnumPropertyItem *items, int value);
int pyrna_set_to_enum_bitfield(const struct EnumPropertyItem *items,
PyObject *value,
diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c
index a8312d89ef8..29e3a07625a 100644
--- a/source/blender/python/intern/bpy_rna_array.c
+++ b/source/blender/python/intern/bpy_rna_array.c
@@ -433,7 +433,7 @@ static char *copy_value_single(PyObject *item,
PointerRNA *ptr,
PropertyRNA *prop,
char *data,
- unsigned int item_size,
+ uint item_size,
int *index,
const ItemConvert_FuncArg *convert_item,
RNA_SetIndexFunc rna_set_index)
@@ -462,7 +462,7 @@ static char *copy_values(PyObject *seq,
PropertyRNA *prop,
int dim,
char *data,
- unsigned int item_size,
+ uint item_size,
int *index,
const ItemConvert_FuncArg *convert_item,
RNA_SetIndexFunc rna_set_index)
diff --git a/source/blender/python/intern/bpy_rna_id_collection.c b/source/blender/python/intern/bpy_rna_id_collection.c
index ca5cb287401..2ff1dae6ca4 100644
--- a/source/blender/python/intern/bpy_rna_id_collection.c
+++ b/source/blender/python/intern/bpy_rna_id_collection.c
@@ -70,7 +70,7 @@ typedef struct IDUserMapData {
static int id_code_as_index(const short idcode)
{
- return (int)*((unsigned short *)&idcode);
+ return (int)*((ushort *)&idcode);
}
static bool id_check_type(const ID *id, const BLI_bitmap *types_bitmap)