forked from daurnimator/ldbus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/message_iter: Maintain reference to underlying DBusMessage
Weirdly, an DBusMessageIter doesn't increase the refcount of the referred DBusMessage, thus we need to maintain the reference manually to avoid underlying DBusMessage gets garbagecollected before the DBusMessageIter, which results in a dangling reference. Let's introduce a new type, lDBusMessageIter, which contains both the iterator and the underlying DBusMessage, and refer/unref the message during creation, initialization and garbage collection of the iterator. Closes: daurnimator#20 Signed-off-by: Yao Zi <[email protected]>
- Loading branch information
Showing
3 changed files
with
66 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters