Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 17f79ae

Browse files
committed
update PyWinRT to v1.0.0-beta.9
1 parent e4beecf commit 17f79ae

File tree

1,267 files changed

+24418
-22888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,267 files changed

+24418
-22888
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
## [Unreleased]
66

7+
### Changed
8+
- Update PyWinRT to [v1.0.0-beta.9](https://github.com/pywinrt/pywinrt/releases/tag/v1.0.0-beta.9).
9+
710
## [v1.0.0b8] - 2023-04-02
811

912
### Changed

generate.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
param ([switch]$skipNugetInstall)
22

3-
$pywinrt_version = '1.0.0-beta.8'
3+
$pywinrt_version = '1.0.0-beta.9'
44
$cppwinrt_version = '2.0.230225.1'
55
$windows_sdk_version = '10.0.22621.0+'
66
$repoRootPath = (Get-Item $PSScriptRoot).FullName

pywinrt/winsdk/_winrt.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.8
1+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9
22

33
import array
44
import types

pywinrt/winsdk/src/_winrt.cpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.8
1+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9
22

3-
#include "pybase.h"
3+
// must be included before winrt to avoid compile errors
44
#include <Shobjidl.h>
5+
6+
#include "pybase.h"
57
#include <winrt/base.h>
68

79
namespace py::cpp::_winrt
@@ -15,7 +17,7 @@ namespace py::cpp::_winrt
1517

1618
// BEGIN: class _winrt.Object:
1719

18-
constexpr const char* const _type_name_Object = "Object";
20+
static constexpr const char* const type_name_Object = "Object";
1921

2022
PyDoc_STRVAR(Object_doc, "base class for wrapped WinRT object instances.");
2123

@@ -24,7 +26,7 @@ namespace py::cpp::_winrt
2426
PyObject* /* unused */,
2527
PyObject* /* unused */) noexcept
2628
{
27-
py::set_invalid_activation_error(_type_name_Object);
29+
py::set_invalid_activation_error(type_name_Object);
2830
return nullptr;
2931
}
3032

@@ -44,8 +46,8 @@ namespace py::cpp::_winrt
4446
}
4547

4648
static PyType_Slot Object_type_slots[] = {
47-
{Py_tp_new, Object_new},
48-
{Py_tp_dealloc, Object_dealloc},
49+
{Py_tp_new, reinterpret_cast<void*>(Object_new)},
50+
{Py_tp_dealloc, reinterpret_cast<void*>(Object_dealloc)},
4951
{Py_tp_doc, const_cast<char*>(Object_doc)},
5052
{},
5153
};
@@ -157,10 +159,10 @@ namespace py::cpp::_winrt
157159
PyDoc_STRVAR(MappingIter_doc, "Utility class for wrapping KeyValuePair iterators.");
158160

159161
static PyType_Slot MappingIter_type_slots[] = {
160-
{Py_tp_members, MappingIter_members},
161-
{Py_tp_init, MappingIter_init},
162-
{Py_tp_iter, PyObject_SelfIter},
163-
{Py_tp_iternext, MappingIter_iternext},
162+
{Py_tp_members, reinterpret_cast<void*>(MappingIter_members)},
163+
{Py_tp_init, reinterpret_cast<void*>(MappingIter_init)},
164+
{Py_tp_iter, reinterpret_cast<void*>(PyObject_SelfIter)},
165+
{Py_tp_iternext, reinterpret_cast<void*>(MappingIter_iternext)},
164166
{Py_tp_doc, const_cast<char*>(MappingIter_doc)},
165167
{},
166168
};
@@ -324,7 +326,7 @@ namespace py::cpp::_winrt
324326
assert(state);
325327

326328
state->Object_type = py::register_python_type(
327-
module.get(), _type_name_Object, &Object_type_spec, nullptr, nullptr);
329+
module.get(), type_name_Object, &Object_type_spec, nullptr, nullptr);
328330

329331
if (!state->Object_type)
330332
{

pywinrt/winsdk/src/_winrt_array.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.8
1+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9
22

33
#include "pybase.h"
4+
#include "py.Windows.Foundation.h"
45
#include <winrt/base.h>
56

67
namespace py::cpp::_winrt
@@ -14,8 +15,6 @@ namespace py::cpp::_winrt
1415
std::unique_ptr<py::Array> array;
1516
};
1617

17-
static constexpr const char* const Array_type_name = "Array";
18-
1918
PyDoc_STRVAR(Array_doc, "class for wrapped COM array instances");
2019

2120
/**
@@ -530,15 +529,15 @@ namespace py::cpp::_winrt
530529

531530
static PyType_Slot Array_type_slots[] = {
532531
{Py_tp_doc, const_cast<char*>(Array_doc)},
533-
{Py_tp_new, Array_tp_new},
534-
{Py_tp_dealloc, Array_tp_dealloc},
535-
{Py_tp_getset, Array_tp_getset},
536-
{Py_tp_methods, Array_tp_methods},
537-
{Py_sq_length, Array_sq_length},
538-
{Py_sq_item, Array_sq_item},
539-
{Py_sq_ass_item, Array_sq_ass_item},
532+
{Py_tp_new, reinterpret_cast<void*>(Array_tp_new)},
533+
{Py_tp_dealloc, reinterpret_cast<void*>(Array_tp_dealloc)},
534+
{Py_tp_getset, reinterpret_cast<void*>(Array_tp_getset)},
535+
{Py_tp_methods, reinterpret_cast<void*>(Array_tp_methods)},
536+
{Py_sq_length, reinterpret_cast<void*>(Array_sq_length)},
537+
{Py_sq_item, reinterpret_cast<void*>(Array_sq_item)},
538+
{Py_sq_ass_item, reinterpret_cast<void*>(Array_sq_ass_item)},
540539
#if PY_VERSION_HEX >= 0x03090000
541-
{Py_bf_getbuffer, Array_bf_getbuffer},
540+
{Py_bf_getbuffer, reinterpret_cast<void*>(Array_bf_getbuffer)},
542541
#endif
543542
{},
544543
};

0 commit comments

Comments
 (0)