Skip to content

Commit

Permalink
Code fixes for PHP 5.6-dev and 5.7-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Jan 5, 2014
1 parent 70b8fdc commit 105dee3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ext/kernel/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ int phalcon_memnstr_str(const zval *haystack, char *needle, unsigned int needle_
*/
void phalcon_fast_strpos(zval *return_value, const zval *haystack, const zval *needle) {

#if PHP_VERSION_ID >= 50600
const
#endif
char *found = NULL;

if (unlikely(Z_TYPE_P(haystack) != IS_STRING || Z_TYPE_P(needle) != IS_STRING)) {
Expand Down Expand Up @@ -418,6 +421,9 @@ void phalcon_fast_strpos(zval *return_value, const zval *haystack, const zval *n
*/
void phalcon_fast_strpos_str(zval *return_value, const zval *haystack, char *needle, unsigned int needle_length) {

#if PHP_VERSION_ID >= 50600
const
#endif
char *found = NULL;

if (unlikely(Z_TYPE_P(haystack) != IS_STRING)) {
Expand All @@ -441,6 +447,9 @@ void phalcon_fast_strpos_str(zval *return_value, const zval *haystack, char *nee
*/
void phalcon_fast_stripos_str(zval *return_value, zval *haystack, char *needle, unsigned int needle_length) {

#if PHP_VERSION_ID >= 50600
const
#endif
char *found = NULL;
char *needle_dup, *haystack_dup;

Expand Down

0 comments on commit 105dee3

Please sign in to comment.