-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Refactored immplementation of https://wiki.php.net/rfc/class_const_vi… #1662
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
Conversation
ZEND_ASSERT(c->flags & ZEND_ACC_PROTECTED); | ||
return zend_check_protected(c->ce, scope); | ||
} | ||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreachable return.
808442a
to
05dbfc5
Compare
@@ -310,6 +310,13 @@ typedef struct _zend_property_info { | |||
#define OBJ_PROP_TO_NUM(offset) \ | |||
((offset - OBJ_PROP_TO_OFFSET(0)) / sizeof(zval)) | |||
|
|||
typedef struct _zend_class_constant { | |||
zval value; | |||
uint32_t flags; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you can use zval.u2.var_flags instead of flags here? which could save a pointer size for this struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea. I also though about this, but then forgot :)
I'll try to change this tomorrow.
On Mon, Dec 7, 2015 at 7:14 PM, Xinchen Hui [email protected]
wrote:
In Zend/zend_compile.h
#1662 (comment):@@ -310,6 +310,13 @@ typedef struct _zend_property_info {
#define OBJ_PROP_TO_NUM(offset)
((offset - OBJ_PROP_TO_OFFSET(0)) / sizeof(zval))+typedef struct _zend_class_constant {
- zval value;
- uint32_t flags;
maybe you can use zval.u2.var_flags instead of flags here? which should
save a pointer size for this struct—
Reply to this email directly or view it on GitHub
https://github.com/php/php-src/pull/1662/files#r46839438.
05dbfc5
to
f11ca0e
Compare
Merged into master. |
New PR based on @Sean-Der 's #1494