Skip to content

Commit 121dc88

Browse files
authored
Merge pull request #104 from altendky/voidptr
sip.voidptr handles integer values and sequences
2 parents 343aada + aca420e commit 121dc88

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1515
* [#51](https://github.com/stlehmann/PyQt5-stubs/pull/51) adds `pyqtBoundSignal.signal` hinted as `str`
1616

1717
### Changed
18+
* [#104](https://github.com/stlehmann/PyQt5-stubs/pull/104) `sip.voidptr` handles integer values and sequences and takes `self`
1819
* [#103](https://github.com/stlehmann/PyQt5-stubs/pull/103) `pyqtBoundSignal.disconnect()`'s `slot` parameter is optional
1920
* [#100](https://github.com/stlehmann/PyQt5-stubs/pull/100) fill generic parameter as `sip.array[int]` for QtDataVisualization textures
2021
* [#92](https://github.com/stlehmann/PyQt5-stubs/pull/92) remove self from `qDefaultSurfaceFormat()` and `qIdForNode()`

PyQt5-stubs/sip.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class array(Sequence[_T], Generic[_T]):
6363
# The voidptr type.
6464
class voidptr:
6565

66-
def __init__(addr: Union[int, Buffer], size: int = -1, writeable: bool = True) -> None: ...
66+
def __init__(self, addr: Union[int, None, bytes, bytearray, 'voidptr'], size: int = -1, writeable: bool = True) -> None: ...
6767

6868
def __int__(self) -> int: ...
6969

@@ -79,7 +79,7 @@ class voidptr:
7979

8080
def __setitem__(self, i: Union[int, slice], v: Buffer) -> None: ...
8181

82-
def asarray(self, size: int = -1) -> array: ...
82+
def asarray(self, size: int = -1) -> array[int]: ...
8383

8484
# Python doesn't expose the capsule type.
8585
#def ascapsule(self) -> capsule: ...

0 commit comments

Comments
 (0)