winrt-runtime 4.0.0__tar.gz → 4.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {winrt_runtime-4.0.0/python/winrt_runtime.egg-info → winrt_runtime-4.0.1}/PKG-INFO +1 -1
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1/python/winrt_runtime.egg-info}/PKG-INFO +1 -1
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/structs.cpp +28 -12
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/table.cpp +40 -7
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/table.h +18 -2
- winrt_runtime-4.0.1/version.txt +1 -0
- winrt_runtime-4.0.0/version.txt +0 -1
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/LICENSE +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/MANIFEST.in +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/README.md +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/pyproject.toml +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/__pyinstaller/__init__.py +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/__pyinstaller/hook-winrt.py +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/_winrt.pyi +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/py.typed +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/runtime/__init__.py +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/runtime/_internals.py +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/runtime/interop.py +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/runtime/py.typed +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/system/__init__.py +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/system/hresult.py +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt/system/py.typed +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt_runtime.egg-info/SOURCES.txt +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt_runtime.egg-info/dependency_links.txt +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt_runtime.egg-info/entry_points.txt +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt_runtime.egg-info/requires.txt +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt_runtime.egg-info/top_level.txt +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/requirements.txt +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/setup.cfg +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/setup.py +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/_winrt.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/_winrt_array.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/_winrt_array.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/_winrt_box.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/_winrt_buffer.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/_winrt_buffer.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/arrays.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/arrays.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/async.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/async.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/callbacks.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/callbacks.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/collections.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/collections.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/compose.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/compose.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/delegates.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/delegates.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/enums.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/enums.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/errors.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/generics.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/generics.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/implements.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/implements.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/Windows.Foundation.Collections.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/Windows.Foundation.Metadata.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/Windows.Foundation.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/Windows.Storage.Streams.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/Windows.Storage.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/base.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/base_macros.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Devices.Geolocation.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Devices.Geolocation.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.2.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Collections.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Collections.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Collections.2.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Metadata.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Metadata.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Metadata.2.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.2.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.FileProperties.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.FileProperties.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.FileProperties.2.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.Provider.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.Provider.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.Provider.2.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.Search.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.Search.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.Search.2.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.Streams.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.Streams.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.Streams.2.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.System.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.System.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.System.2.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.System.RemoteSystems.0.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.System.RemoteSystems.1.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pythoncapi_compat.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/abi.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/array.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/async.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/base.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/buffer.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/convert.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/errors.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/handles.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/prelude.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/throw_helpers.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/traits.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/pywinrt/wrappers.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/interp.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/interp.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/members.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/members.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/metaclass.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/module_state.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/numerics-buffer.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/numerics-buffer.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/numerics-statics.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/numerics-statics.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/numerics-traits.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/numerics-values.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/numerics.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/numerics.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/objects.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/objects.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/protocols.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/protocols.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/pycollections.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/pycollections.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/pymapping.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/pymapping.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/pysequence.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/pysequence.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/runtime.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/runtime.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/shapes-generated.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/shapes.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/shapes.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/structs.h +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/types.cpp +0 -0
- {winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/types.h +0 -0
|
@@ -995,7 +995,34 @@ namespace py::interp
|
|
|
995
995
|
bool make_struct_type(
|
|
996
996
|
projection& proj, type_entry& entry, table::type_view const& record)
|
|
997
997
|
{
|
|
998
|
-
|
|
998
|
+
entry.fields.resize(record.field_count());
|
|
999
|
+
|
|
1000
|
+
// A struct in a struct is resolved into the field before anything is
|
|
1001
|
+
// laid out. Releasing one has to know what it holds and is not a place
|
|
1002
|
+
// that can import a package, and the table cannot measure a struct of
|
|
1003
|
+
// another namespace: it holds only an external record naming it, with
|
|
1004
|
+
// no fields, so the size has to come from the entry that defines it.
|
|
1005
|
+
for (uint32_t i = 0; i < record.field_count(); i++)
|
|
1006
|
+
{
|
|
1007
|
+
auto& field = entry.fields[i];
|
|
1008
|
+
|
|
1009
|
+
field.code = record.field(i).code();
|
|
1010
|
+
field.type = record.field(i).type();
|
|
1011
|
+
|
|
1012
|
+
if (field.code == table::type_code::struct_
|
|
1013
|
+
&& !resolve(proj, field.type, field.info))
|
|
1014
|
+
{
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
auto const layout = proj.table->get_struct_layout(
|
|
1020
|
+
record,
|
|
1021
|
+
[&entry](uint32_t position)
|
|
1022
|
+
{
|
|
1023
|
+
auto const& info = *entry.fields[position].info;
|
|
1024
|
+
return table::value_layout{info.size, info.align};
|
|
1025
|
+
});
|
|
999
1026
|
|
|
1000
1027
|
entry.numerics_kind = numerics::classify(entry.winrt_name);
|
|
1001
1028
|
|
|
@@ -1012,7 +1039,6 @@ namespace py::interp
|
|
|
1012
1039
|
entry.align = layout.align;
|
|
1013
1040
|
entry.blob_offset
|
|
1014
1041
|
= align_up(static_cast<uint32_t>(sizeof(PyObject)), layout.align);
|
|
1015
|
-
entry.fields.resize(record.field_count());
|
|
1016
1042
|
|
|
1017
1043
|
std::vector<PyGetSetDef> getsets;
|
|
1018
1044
|
|
|
@@ -1021,9 +1047,7 @@ namespace py::interp
|
|
|
1021
1047
|
auto const record_field = record.field(i);
|
|
1022
1048
|
auto& field = entry.fields[i];
|
|
1023
1049
|
|
|
1024
|
-
field.code = record_field.code();
|
|
1025
1050
|
field.offset = layout.offsets[i];
|
|
1026
|
-
field.type = record_field.type();
|
|
1027
1051
|
field.declaring = &entry;
|
|
1028
1052
|
|
|
1029
1053
|
pyobj_handle interned{
|
|
@@ -1048,14 +1072,6 @@ namespace py::interp
|
|
|
1048
1072
|
entry.owns_resources = true;
|
|
1049
1073
|
break;
|
|
1050
1074
|
case table::type_code::struct_:
|
|
1051
|
-
// A struct in a struct is resolved into the field now rather
|
|
1052
|
-
// than on first use, because releasing one has to know what
|
|
1053
|
-
// it holds and is not a place that can import a package.
|
|
1054
|
-
if (!resolve(proj, field.type, field.info))
|
|
1055
|
-
{
|
|
1056
|
-
return false;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
1075
|
if (field.info->owns_resources)
|
|
1060
1076
|
{
|
|
1061
1077
|
entry.owns_resources = true;
|
|
@@ -359,9 +359,10 @@ namespace py::table
|
|
|
359
359
|
return type_view{this, index};
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
-
struct_layout file::get_struct_layout(
|
|
362
|
+
struct_layout file::get_struct_layout(
|
|
363
|
+
type_view type, struct_field_measure const& measure_struct) const
|
|
363
364
|
{
|
|
364
|
-
struct_layout result{0, 1, {}};
|
|
365
|
+
struct_layout result{0, 1, {}, true};
|
|
365
366
|
uint32_t offset = 0;
|
|
366
367
|
auto const count = type.field_count();
|
|
367
368
|
|
|
@@ -372,9 +373,29 @@ namespace py::table
|
|
|
372
373
|
auto const field = type.field(i);
|
|
373
374
|
value_layout layout;
|
|
374
375
|
|
|
375
|
-
if (field.code() == type_code::struct_)
|
|
376
|
+
if (field.code() == type_code::struct_ && measure_struct)
|
|
376
377
|
{
|
|
377
|
-
|
|
378
|
+
layout = measure_struct(i);
|
|
379
|
+
}
|
|
380
|
+
else if (field.code() == type_code::struct_)
|
|
381
|
+
{
|
|
382
|
+
auto const record = this->type(field.type());
|
|
383
|
+
|
|
384
|
+
// An external record is a name and nothing else, so measuring
|
|
385
|
+
// it here would find no fields and call the struct empty.
|
|
386
|
+
if (record.is_external())
|
|
387
|
+
{
|
|
388
|
+
result.measured = false;
|
|
389
|
+
return result;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
auto const nested = get_struct_layout(record);
|
|
393
|
+
if (!nested.measured)
|
|
394
|
+
{
|
|
395
|
+
result.measured = false;
|
|
396
|
+
return result;
|
|
397
|
+
}
|
|
398
|
+
|
|
378
399
|
layout = {nested.size, nested.align};
|
|
379
400
|
}
|
|
380
401
|
else
|
|
@@ -1097,10 +1118,14 @@ namespace py::cpp::_winrt
|
|
|
1097
1118
|
return pyobj_handle{};
|
|
1098
1119
|
}
|
|
1099
1120
|
|
|
1121
|
+
// A field at or after one this table cannot measure has no
|
|
1122
|
+
// offset that the table alone can say.
|
|
1100
1123
|
if (!set_item(
|
|
1101
1124
|
item.get(),
|
|
1102
1125
|
"offset",
|
|
1103
|
-
|
|
1126
|
+
i < layout.offsets.size()
|
|
1127
|
+
? PyLong_FromUnsignedLong(layout.offsets[i])
|
|
1128
|
+
: Py_NewRef(Py_None)))
|
|
1104
1129
|
{
|
|
1105
1130
|
return pyobj_handle{};
|
|
1106
1131
|
}
|
|
@@ -1290,12 +1315,20 @@ namespace py::cpp::_winrt
|
|
|
1290
1315
|
return pyobj_handle{};
|
|
1291
1316
|
}
|
|
1292
1317
|
|
|
1293
|
-
if (!set_item(
|
|
1318
|
+
if (!set_item(
|
|
1319
|
+
result.get(),
|
|
1320
|
+
"size",
|
|
1321
|
+
layout.measured ? PyLong_FromUnsignedLong(layout.size)
|
|
1322
|
+
: Py_NewRef(Py_None)))
|
|
1294
1323
|
{
|
|
1295
1324
|
return pyobj_handle{};
|
|
1296
1325
|
}
|
|
1297
1326
|
|
|
1298
|
-
if (!set_item(
|
|
1327
|
+
if (!set_item(
|
|
1328
|
+
result.get(),
|
|
1329
|
+
"align",
|
|
1330
|
+
layout.measured ? PyLong_FromUnsignedLong(layout.align)
|
|
1331
|
+
: Py_NewRef(Py_None)))
|
|
1299
1332
|
{
|
|
1300
1333
|
return pyobj_handle{};
|
|
1301
1334
|
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
#include <cstddef>
|
|
17
17
|
#include <cstdint>
|
|
18
|
+
#include <functional>
|
|
18
19
|
#include <stdexcept>
|
|
19
20
|
#include <string>
|
|
20
21
|
#include <string_view>
|
|
@@ -441,14 +442,26 @@ namespace py::table
|
|
|
441
442
|
* Offsets are never written into the table, because a pointer is not the
|
|
442
443
|
* same width on every architecture the same table serves, so they are
|
|
443
444
|
* computed here from the field type codes.
|
|
445
|
+
*
|
|
446
|
+
* A struct field whose struct belongs to another namespace cannot be
|
|
447
|
+
* measured from this table, which holds only an external record naming
|
|
448
|
+
* it. Without a measure for it the layout stops there: @c measured is
|
|
449
|
+
* false, and @c offsets has an entry only for the fields before it.
|
|
444
450
|
*/
|
|
445
451
|
struct struct_layout
|
|
446
452
|
{
|
|
447
453
|
uint32_t size;
|
|
448
454
|
uint32_t align;
|
|
449
455
|
std::vector<uint32_t> offsets;
|
|
456
|
+
bool measured;
|
|
450
457
|
};
|
|
451
458
|
|
|
459
|
+
/**
|
|
460
|
+
* The size and alignment of the struct field at @p position of the struct
|
|
461
|
+
* being laid out, from what knows the field's type better than the table.
|
|
462
|
+
*/
|
|
463
|
+
using struct_field_measure = std::function<value_layout(uint32_t position)>;
|
|
464
|
+
|
|
452
465
|
/**
|
|
453
466
|
* One namespace's table, over bytes it does not own.
|
|
454
467
|
*/
|
|
@@ -541,8 +554,11 @@ namespace py::table
|
|
|
541
554
|
return guid_count_;
|
|
542
555
|
}
|
|
543
556
|
|
|
544
|
-
/// Computes the layout of the struct @p type declares
|
|
545
|
-
|
|
557
|
+
/// Computes the layout of the struct @p type declares, measuring each
|
|
558
|
+
/// struct field with @p measure_struct if one is given and from this
|
|
559
|
+
/// table otherwise.
|
|
560
|
+
struct_layout get_struct_layout(
|
|
561
|
+
type_view type, struct_field_measure const& measure_struct = {}) const;
|
|
546
562
|
|
|
547
563
|
// The accessors below are what the views are made of. They are public
|
|
548
564
|
// because the views are separate classes, not because anything outside
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4.0.1
|
winrt_runtime-4.0.0/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4.0.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/python/winrt_runtime.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/Windows.Foundation.Metadata.h
RENAMED
|
File without changes
|
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/Windows.Storage.Streams.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.0.h
RENAMED
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.1.h
RENAMED
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Foundation.2.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.0.h
RENAMED
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.1.h
RENAMED
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.Storage.2.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.System.0.h
RENAMED
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.System.1.h
RENAMED
|
File without changes
|
{winrt_runtime-4.0.0 → winrt_runtime-4.0.1}/src/include/cppwinrt/winrt/impl/Windows.System.2.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|