Add a patch for co v2.0.2 (#20657)

* add a patch for co v2.0.2

* update port version

* update version

* version

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
This commit is contained in:
Alvin 2021-10-14 05:41:13 +08:00 committed by GitHub
parent b312224c7b
commit f1e18c43d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/co/co.cc b/src/co/co.cc
index 8921296..838ac16 100644
--- a/src/co/co.cc
+++ b/src/co/co.cc
@@ -8,7 +8,7 @@ namespace co {
class EventImpl {
public:
EventImpl() : _counter(0), _signaled(false), _has_cond(false) {}
- ~EventImpl() { co::xx::cond_destroy(&_cond); }
+ ~EventImpl() { if (_has_cond) co::xx::cond_destroy(&_cond); }
bool wait(uint32 ms);

View File

@ -10,6 +10,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
install-dll.patch
fix-event-destruct.patch
)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)

View File

@ -1,6 +1,7 @@
{
"name": "co",
"version-semver": "2.0.2",
"port-version": 1,
"description": "A go-style coroutine library in C++11 and more",
"homepage": "https://github.com/idealvin/co",
"supports": "!uwp & !(arm & windows)",

View File

@ -1422,7 +1422,7 @@
},
"co": {
"baseline": "2.0.2",
"port-version": 0
"port-version": 1
},
"coin": {
"baseline": "4.0.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b2b668ad241e0a4453f7a4f0a7c0b35e8c922e3b",
"version-semver": "2.0.2",
"port-version": 1
},
{
"git-tree": "2b21d0aa5397dedda9219671af687afacab91a6c",
"version-semver": "2.0.2",