Skip to content

Commit 2365413

Browse files
committed
Change uintptr_t to void* explicitly
1 parent db9ea88 commit 2365413

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/module.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ namespace py3lm {
418418
ret->ConstructAt<plg::vector<uint64_t>>();
419419
break;
420420
case ValueType::ArrayPointer:
421-
ret->ConstructAt<plg::vector<uintptr_t>>();
421+
ret->ConstructAt<plg::vector<void*>>();
422422
break;
423423
case ValueType::ArrayFloat:
424424
ret->ConstructAt<plg::vector<float>>();
@@ -1469,7 +1469,7 @@ namespace py3lm {
14691469
break;
14701470
}
14711471
case ValueType::Pointer: {
1472-
delete reinterpret_cast<uintptr_t*>(ptr);
1472+
delete reinterpret_cast<void**>(ptr);
14731473
break;
14741474
}
14751475
case ValueType::Float: {
@@ -1529,7 +1529,7 @@ namespace py3lm {
15291529
break;
15301530
}
15311531
case ValueType::ArrayPointer: {
1532-
delete reinterpret_cast<plg::vector<uintptr_t>*>(ptr);
1532+
delete reinterpret_cast<plg::vector<void*>*>(ptr);
15331533
break;
15341534
}
15351535
case ValueType::ArrayFloat: {
@@ -1637,7 +1637,7 @@ namespace py3lm {
16371637
break;
16381638
}
16391639
case ValueType::ArrayPointer: {
1640-
value = new plg::vector<uintptr_t>();
1640+
value = new plg::vector<void*>();
16411641
a.storage.emplace_back(value, retType);
16421642
break;
16431643
}
@@ -1738,7 +1738,7 @@ namespace py3lm {
17381738
return CreatePyObject(val);
17391739
}
17401740
case ValueType::Pointer: {
1741-
const uintptr_t val = ret.GetReturn<uintptr_t>();
1741+
void* val = ret.GetReturn<void*>();
17421742
return CreatePyObject(val);
17431743
}
17441744
case ValueType::Float: {
@@ -1802,8 +1802,8 @@ namespace py3lm {
18021802
return CreatePyObjectList<uint64_t>(*arr);
18031803
}
18041804
case ValueType::ArrayPointer: {
1805-
auto* const arr = ret.GetReturn<plg::vector<uintptr_t>*>();
1806-
return CreatePyObjectList<uintptr_t>(*arr);
1805+
auto* const arr = ret.GetReturn<plg::vector<void*>*>();
1806+
return CreatePyObjectList<void*>(*arr);
18071807
}
18081808
case ValueType::ArrayFloat: {
18091809
auto* const arr = ret.GetReturn<plg::vector<float>*>();
@@ -1944,7 +1944,7 @@ namespace py3lm {
19441944
return true;
19451945
}
19461946
case ValueType::Pointer: {
1947-
const auto value = ValueFromObject<uintptr_t>(pItem);
1947+
const auto value = ValueFromObject<void*>(pItem);
19481948
if (!value) {
19491949
return false;
19501950
}
@@ -2084,7 +2084,7 @@ namespace py3lm {
20842084
return true;
20852085
}
20862086
case ValueType::ArrayPointer: {
2087-
void* const value = CreateArray<uintptr_t>(pItem);
2087+
void* const value = CreateArray<void*>(pItem);
20882088
if (!value) {
20892089
return false;
20902090
}
@@ -2199,7 +2199,7 @@ namespace py3lm {
21992199
case ValueType::UInt64:
22002200
return PushRefParam(CreateValue<uint64_t>(pItem));
22012201
case ValueType::Pointer:
2202-
return PushRefParam(CreateValue<uintptr_t>(pItem));
2202+
return PushRefParam(CreateValue<void*>(pItem));
22032203
case ValueType::Float:
22042204
return PushRefParam(CreateValue<float>(pItem));
22052205
case ValueType::Double:
@@ -2229,7 +2229,7 @@ namespace py3lm {
22292229
case ValueType::ArrayUInt64:
22302230
return PushRefParam(CreateArray<uint64_t>(pItem));
22312231
case ValueType::ArrayPointer:
2232-
return PushRefParam(CreateArray<uintptr_t>(pItem));
2232+
return PushRefParam(CreateArray<void*>(pItem));
22332233
case ValueType::ArrayFloat:
22342234
return PushRefParam(CreateArray<float>(pItem));
22352235
case ValueType::ArrayDouble:
@@ -2285,7 +2285,7 @@ namespace py3lm {
22852285
case ValueType::String:
22862286
return CreatePyObject(*reinterpret_cast<plg::string*>(std::get<0>(a.storage[index])));
22872287
case ValueType::Pointer:
2288-
return CreatePyObject(*reinterpret_cast<uintptr_t*>(std::get<0>(a.storage[index])));
2288+
return CreatePyObject(*reinterpret_cast<void**>(std::get<0>(a.storage[index])));
22892289
case ValueType::ArrayBool:
22902290
return CreatePyObjectList(*reinterpret_cast<plg::vector<bool>*>(std::get<0>(a.storage[index])));
22912291
case ValueType::ArrayChar8:
@@ -2309,7 +2309,7 @@ namespace py3lm {
23092309
case ValueType::ArrayUInt64:
23102310
return CreatePyObjectList(*reinterpret_cast<plg::vector<uint64_t>*>(std::get<0>(a.storage[index])));
23112311
case ValueType::ArrayPointer:
2312-
return CreatePyObjectList(*reinterpret_cast<plg::vector<uintptr_t>*>(std::get<0>(a.storage[index])));
2312+
return CreatePyObjectList(*reinterpret_cast<plg::vector<void*>*>(std::get<0>(a.storage[index])));
23132313
case ValueType::ArrayFloat:
23142314
return CreatePyObjectList(*reinterpret_cast<plg::vector<float>*>(std::get<0>(a.storage[index])));
23152315
case ValueType::ArrayDouble:

0 commit comments

Comments
 (0)