Uh oh!
There was an error while loading. Please reload this page.
Refactored some ZPP calls in OCI8. - #5714
Conversation
| if (ZEND_NUM_ARGS() == 2) { | ||
| data_len = MIN((zend_long) data_len, write_len); | ||
| } | ||
| if (getThis() && ZEND_NUM_ARGS() == 2) { |
There was a problem hiding this comment.
These consecutive checks everywhere could be optimized a tiny little bit by either:
- using
else ifclauses - extracting
getThis()in an outer condition so that this function is not called multiple times
However, all the ZEND_NUM_ARGS() == ... checks indicate that the default value handling is not right - which is something we want to fix later. That's why I'm also ok with leaving these conditions as you have them currently.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kocsismate
commented
Jun 14, 2020
ping @cjbj |
carusogabriel
commented
Jun 16, 2020
Do we have |
@carusogabriel Nope. :( I believe Jens run the tests locally. @jensdenies, so the tests pass, right? |
cjbj
commented
Jun 16, 2020
Traditionally only gcov ran Oracle DB. But I guess http://gcov.php.net/ is obsolete? |
nikic
commented
Jun 16, 2020
@cjbj Yes, gcov is no longer used. To test oci, we'd need to have it on either Travis, Azure Pipelines or AppVeyor. It does look like installing it on travis is possible: https://github.com/Vincit/travis-oracledb-xe No idea how compatible that is with licensing. |
nikic
commented
Jun 16, 2020
I've opened php/php-tasks#5 to track testing oci8 on CI, though from a cursory look, it doesn't look like a simple thing right now. |
Thanks to the comments of @kocsismate on #5701 i refactored some ZPP calls to the "zend_parse_method_parameters" variant, which ensures ZPP is always called on method/function invocation.
I also moved the "old_oci_close_semantics" check beneath the ZPP check.