Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add grayContent #76

Merged
merged 8 commits into from
Jul 11, 2017
Merged

Add grayContent #76

merged 8 commits into from
Jul 11, 2017

Conversation

zzorrow
Copy link
Contributor

@zzorrow zzorrow commented Jul 10, 2017

新增了一个grayContent,通过灰度id返回,灰度结点的map; 另外发现在php 7.0.12 版本里 char * 这种字符串会报错,需要用zend_string; 其余的php7版本 又是正常的。

Copy link
Contributor

@gaodq gaodq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deps下相关的修改还是去掉吧

@zzorrow
Copy link
Contributor Author

zzorrow commented Jul 10, 2017

deps 已经还原 @gaodq

Copy link
Contributor

@gaodq gaodq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用PHP7的grayContent我没有获取到相应数据,你们那里测试过可以吗?

std::vector<std::pair<std::string, std::string> >::iterator it;
array_init(return_value);

if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &gray_id, &$gray_id_len) == FAILURE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行编不过

if (QCONF_OK != qconfzk->zk_gray_get_content(std::string(gray_id, gray_id_len), nodes)) RETURN_LONG(QCONF_PHP_ERROR);
for (it = nodes.begin(); it != nodes.end(); ++it)
{
add_assoc_string(return_value,(*it).first.c_str(),(char *)(*it).second.c_str());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个应该还是PHP7的函数吧,PHP5编不过

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我的错,docker环境出了问题,不严谨!

@zzorrow
Copy link
Contributor Author

zzorrow commented Jul 11, 2017

重新在php5和php7 环境下 测试通过 @gaodq ; 另外master 本地安装失败 QConf/deps/zookeeper/configure 的LIBTOOL的问题

@gaodq
Copy link
Contributor

gaodq commented Jul 11, 2017

感谢提交!
LIBTOOL的问题我也注意到了,呆会修复下

@gaodq gaodq merged commit cb544c6 into Qihoo360:master Jul 11, 2017
gaodq pushed a commit that referenced this pull request Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants