diff options
author | Remi Collet <remi@remirepo.net> | 2021-08-25 09:58:58 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2021-08-25 09:58:58 +0200 |
commit | ed43300dab14e50d2925dc78a9eb5fc5f2e9ae98 (patch) | |
tree | 24e77b1776a7f8afb9e46072b70e09799c1fddcf /6.patch |
initial package, version 1.0.0 (stable)
open https://github.com/SeasX/SeasSnowflake/pull/3 - fix test
open https://github.com/SeasX/SeasSnowflake/pull/4 - exec perm
open https://github.com/SeasX/SeasSnowflake/pull/5 - PHP 5
open https://github.com/SeasX/SeasSnowflake/pull/6 - arginfo
Diffstat (limited to '6.patch')
-rw-r--r-- | 6.patch | 57 |
1 files changed, 57 insertions, 0 deletions
@@ -0,0 +1,57 @@ +From b5df08afb79b6fa8071420ec096a0c75d02d682e Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 25 Aug 2021 09:34:34 +0200 +Subject: [PATCH 1/2] generate have no arg + +--- + SeasSnowflake.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/SeasSnowflake.cpp b/SeasSnowflake.cpp +index 1a3282e..ccc04a1 100755 +--- a/SeasSnowflake.cpp ++++ b/SeasSnowflake.cpp +@@ -59,8 +59,7 @@ ZEND_BEGIN_ARG_INFO_EX(SeasSnowflake_construct, 0, 0, 1) + ZEND_ARG_INFO(0, parames) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO_EX(SeasSnowflake_generate, 0, 0, 1) +-ZEND_ARG_INFO(0, id) ++ZEND_BEGIN_ARG_INFO_EX(SeasSnowflake_generate, 0, 0, 0) + ZEND_END_ARG_INFO() + + ZEND_BEGIN_ARG_INFO_EX(SeasSnowflake_degenerate, 0, 0, 1) +@@ -244,6 +243,10 @@ PHP_METHOD(SEASSNOWFLAKE_RES_NAME, generate) + zval *worker_id = sc_zend_read_property(SeasSnowflake_ce, this_obj, "worker_id", sizeof("worker_id") - 1, 0); + zval *datacenter_id = sc_zend_read_property(SeasSnowflake_ce, this_obj, "datacenter_id", sizeof("datacenter_id") - 1, 0); + ++ if (zend_parse_parameters_none() == FAILURE) ++ { ++ return; ++ } + + idWorker.setDatacenterId(Z_LVAL_P(worker_id)); + idWorker.setWorkerId(Z_LVAL_P(datacenter_id)); + +From a0b25161727f7346f8120f9e0161e498451e0b0e Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 25 Aug 2021 09:37:39 +0200 +Subject: [PATCH 2/2] degenerate have a single arg + +--- + SeasSnowflake.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SeasSnowflake.cpp b/SeasSnowflake.cpp +index ccc04a1..c36197b 100755 +--- a/SeasSnowflake.cpp ++++ b/SeasSnowflake.cpp +@@ -294,7 +294,7 @@ PHP_METHOD(SEASSNOWFLAKE_RES_NAME, degenerate) + #else + #undef IS_UNDEF + #define IS_UNDEF Z_EXPECTED_LONG +- ZEND_PARSE_PARAMETERS_START(1, 2) ++ ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_STRING(id, l_id) + Z_PARAM_OPTIONAL + // Z_PARAM_ARRAY(params) |