libsigc++3: Update to 3.0.3
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
From 138510d4002a0ee866016f462e6687454757b4e8 Mon Sep 17 00:00:00 2001
|
||||
From: AIGRIND <AIGRIND-LLC@users.noreply.github.com>
|
||||
Date: Wed, 25 Sep 2019 11:29:45 +0200
|
||||
Subject: [PATCH] Empty connections can be safely copied now
|
||||
|
||||
Copy constructor and `operator=` could fail if `src` was empty.
|
||||
```
|
||||
sigc::connection con1;
|
||||
sigc::connection con2(con1); // failed
|
||||
```
|
||||
```
|
||||
sigc::connection con3;
|
||||
sigc::connection con4;
|
||||
con3 = con4; // failed
|
||||
```
|
||||
---
|
||||
sigc++/weak_raw_ptr.h | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sigc++/weak_raw_ptr.h b/sigc++/weak_raw_ptr.h
|
||||
index ccae1b0..816981c 100644
|
||||
--- a/sigc++/weak_raw_ptr.h
|
||||
+++ b/sigc++/weak_raw_ptr.h
|
||||
@@ -50,7 +50,8 @@ struct weak_raw_ptr : public sigc::notifiable
|
||||
inline weak_raw_ptr(const weak_raw_ptr& src) noexcept
|
||||
: p_(src.p_)
|
||||
{
|
||||
- p_->add_destroy_notify_callback(this, ¬ify_object_invalidated);
|
||||
+ if (p_)
|
||||
+ p_->add_destroy_notify_callback(this, ¬ify_object_invalidated);
|
||||
}
|
||||
|
||||
inline weak_raw_ptr& operator=(const weak_raw_ptr& src) noexcept
|
||||
@@ -60,7 +61,9 @@ struct weak_raw_ptr : public sigc::notifiable
|
||||
}
|
||||
|
||||
p_ = src.p_;
|
||||
- p_->add_destroy_notify_callback(this, ¬ify_object_invalidated);
|
||||
+
|
||||
+ if (p_)
|
||||
+ p_->add_destroy_notify_callback(this, ¬ify_object_invalidated);
|
||||
|
||||
return *this;
|
||||
}
|
||||
--
|
||||
2.23.0.windows.1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
_realname=libsigc++
|
||||
pkgbase=mingw-w64-${_realname}3
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}3"
|
||||
pkgver=3.0.0
|
||||
pkgver=3.0.3
|
||||
pkgrel=1
|
||||
pkgdesc="Libsigc++ implements a full callback system for use in widget libraries - V3 (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -12,16 +12,11 @@ license=("LGPL")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
|
||||
options=('staticlibs' 'strip')
|
||||
source=("https://download.gnome.org/sources/libsigc++/${pkgver%.*}/${_realname}-${pkgver}.tar.xz"
|
||||
"0001-Empty-connections-can-be-safely-copied-now.patch")
|
||||
sha256sums=('50a0855c1eb26e6044ffe888dbe061938ab4241f96d8f3754ea7ead38ab8ed06'
|
||||
'97b7d0521265fdc54436eb469a4efbb6692921b9e8ecf29614280e0f4c7e9f96')
|
||||
source=("https://download.gnome.org/sources/libsigc++/${pkgver%.*}/${_realname}-${pkgver}.tar.xz")
|
||||
sha256sums=('e4f4866a894bdbe053e4fb22ccc6bc4b6851fd31a4746fdd20b2cf6e87c6edb6')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
# https://github.com/libsigcplusplus/libsigcplusplus/commit/138510d40
|
||||
patch -p1 -i "${srcdir}"/0001-Empty-connections-can-be-safely-copied-now.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user