diff --git a/ext/cache/backend/xcache.c b/ext/cache/backend/xcache.c
index 681dbd912c3..d935bbb7703 100644
--- a/ext/cache/backend/xcache.c
+++ b/ext/cache/backend/xcache.c
@@ -385,20 +385,19 @@ PHP_METHOD(Phalcon_Cache_Backend_Xcache, queryKeys){
PHALCON_GET_HKEY(key, ah0, hp0);
PHALCON_GET_HVALUE(ttl);
- if (!phalcon_memnstr(key, prefix TSRMLS_CC)) {
+ if (!phalcon_memnstr(key, prefix)) {
zend_hash_move_forward_ex(ah0, &hp0);
continue;
}
PHALCON_INIT_NVAR(real_key);
- phalcon_substr(real_key, key, 5, 0 TSRMLS_CC);
+ phalcon_substr(real_key, key, 5, 0);
phalcon_array_append(&prefixed_keys, real_key, PH_SEPARATE);
- RETURN_CTOR(prefixed_keys);
-
zend_hash_move_forward_ex(ah0, &hp0);
}
+ RETURN_CTOR(prefixed_keys);
}
RETURN_MM_EMPTY_ARRAY();
diff --git a/ext/config/adapter/ini.c b/ext/config/adapter/ini.c
index 9f6c9b9a1c1..a942fd382ea 100755
--- a/ext/config/adapter/ini.c
+++ b/ext/config/adapter/ini.c
@@ -137,9 +137,9 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, __construct){
PHALCON_GET_HKEY(key, ah1, hp1);
PHALCON_GET_HVALUE(value);
- if (phalcon_memnstr_str(key, SL(".") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(key, SL("."))) {
PHALCON_INIT_NVAR(directive_parts);
- phalcon_fast_explode_str(directive_parts, SL("."), key TSRMLS_CC);
+ phalcon_fast_explode_str(directive_parts, SL("."), key);
PHALCON_OBS_NVAR(left_part);
phalcon_array_fetch_long(&left_part, directive_parts, 0, PH_NOISY);
diff --git a/ext/db/adapter/pdo/mysql.c b/ext/db/adapter/pdo/mysql.c
index 2307192539f..90fa669de65 100644
--- a/ext/db/adapter/pdo/mysql.c
+++ b/ext/db/adapter/pdo/mysql.c
@@ -202,7 +202,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Enum are treated as char
*/
- if (phalcon_memnstr_str(column_type, SL("enum") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("enum"))) {
phalcon_array_update_string_long(&definition, SL("type"), 5, PH_SEPARATE);
break;
}
@@ -210,7 +210,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Smallint/Bigint/Integers/Int are int
*/
- if (phalcon_memnstr_str(column_type, SL("int") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("int"))) {
phalcon_array_update_string_long(&definition, SL("type"), 0, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("isNumeric"), &ztrue, PH_COPY | PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 1, PH_SEPARATE);
@@ -220,7 +220,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Varchar are varchars
*/
- if (phalcon_memnstr_str(column_type, SL("varchar") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("varchar"))) {
phalcon_array_update_string_long(&definition, SL("type"), 2, PH_SEPARATE);
break;
}
@@ -228,7 +228,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Special type for datetime
*/
- if (phalcon_memnstr_str(column_type, SL("datetime") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("datetime"))) {
phalcon_array_update_string_long(&definition, SL("type"), 4, PH_SEPARATE);
break;
}
@@ -236,7 +236,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Decimals are floats
*/
- if (phalcon_memnstr_str(column_type, SL("decimal") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("decimal"))) {
phalcon_array_update_string_long(&definition, SL("type"), 3, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("isNumeric"), &ztrue, PH_COPY | PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 32, PH_SEPARATE);
@@ -246,7 +246,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Chars are chars
*/
- if (phalcon_memnstr_str(column_type, SL("char") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("char"))) {
phalcon_array_update_string_long(&definition, SL("type"), 5, PH_SEPARATE);
break;
}
@@ -254,7 +254,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Date/Datetime are varchars
*/
- if (phalcon_memnstr_str(column_type, SL("date") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("date"))) {
phalcon_array_update_string_long(&definition, SL("type"), 1, PH_SEPARATE);
break;
}
@@ -262,7 +262,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Text are varchars
*/
- if (phalcon_memnstr_str(column_type, SL("text") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("text"))) {
phalcon_array_update_string_long(&definition, SL("type"), 6, PH_SEPARATE);
break;
}
@@ -270,7 +270,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Float/Smallfloats/Decimals are float
*/
- if (phalcon_memnstr_str(column_type, SL("float") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("float"))) {
phalcon_array_update_string_long(&definition, SL("type"), 7, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("isNumeric"), &ztrue, PH_COPY | PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 32, PH_SEPARATE);
@@ -287,7 +287,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* If the column type has a parentheses we try to get the column size from it
*/
- if (phalcon_memnstr_str(column_type, SL("(") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("("))) {
PHALCON_INIT_NVAR(matches);
@@ -315,7 +315,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Mysql, describeColumns){
/**
* Check if the column is unsigned, only MySQL support this
*/
- if (phalcon_memnstr_str(column_type, SL("unsigned") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("unsigned"))) {
phalcon_array_update_string(&definition, SL("unsigned"), &ztrue, PH_COPY | PH_SEPARATE);
}
diff --git a/ext/db/adapter/pdo/oracle.c b/ext/db/adapter/pdo/oracle.c
index 547885f5d2c..a52c6da0320 100644
--- a/ext/db/adapter/pdo/oracle.c
+++ b/ext/db/adapter/pdo/oracle.c
@@ -212,47 +212,47 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Oracle, describeColumns){
/**
* Check the column type to get the correct Phalcon type
*/
- if (phalcon_memnstr_str(column_type, SL("NUMBER") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("NUMBER"))) {
phalcon_array_update_string_long(&definition, SL("type"), 3, PH_SEPARATE);
phalcon_array_update_string_bool(&definition, SL("isNumeric"), 1, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &column_precision, PH_COPY | PH_SEPARATE);
phalcon_array_update_string(&definition, SL("scale"), &column_scale, PH_COPY | PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 32, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("INTEGER") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("INTEGER"))) {
phalcon_array_update_string_long(&definition, SL("type"), 0, PH_SEPARATE);
phalcon_array_update_string_bool(&definition, SL("isNumeric"), 1, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &column_precision, PH_COPY | PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 1, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("VARCHAR2") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("VARCHAR2"))) {
phalcon_array_update_string_long(&definition, SL("type"), 2, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &column_size, PH_COPY | PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("FLOAT") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("FLOAT"))) {
phalcon_array_update_string_long(&definition, SL("type"), 7, PH_SEPARATE);
phalcon_array_update_string_bool(&definition, SL("isNumeric"), 1, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &column_size, PH_COPY | PH_SEPARATE);
phalcon_array_update_string(&definition, SL("scale"), &column_scale, PH_COPY | PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 32, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("TIMESTAMP") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("TIMESTAMP"))) {
phalcon_array_update_string_long(&definition, SL("type"), 1, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("RAW") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("RAW"))) {
phalcon_array_update_string_long(&definition, SL("type"), 6, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("BLOB") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("BLOB"))) {
phalcon_array_update_string_long(&definition, SL("type"), 6, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("CLOB") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("CLOB"))) {
phalcon_array_update_string_long(&definition, SL("type"), 6, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("VARCHAR2") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("VARCHAR2"))) {
phalcon_array_update_string_long(&definition, SL("type"), 2, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &column_size, PH_COPY | PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("CHAR") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("CHAR"))) {
phalcon_array_update_string_long(&definition, SL("type"), 5, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &column_size, PH_COPY | PH_SEPARATE);
} else {
diff --git a/ext/db/adapter/pdo/postgresql.c b/ext/db/adapter/pdo/postgresql.c
index dcff3581ade..718016e02bd 100644
--- a/ext/db/adapter/pdo/postgresql.c
+++ b/ext/db/adapter/pdo/postgresql.c
@@ -195,50 +195,50 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeColumns){
/**
* Check the column type to get the correct Phalcon type
*/
- if (phalcon_memnstr_str(column_type, SL("int") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("int"))) {
phalcon_array_update_string_long(&definition, SL("type"), 0, PH_SEPARATE);
phalcon_array_update_string_bool(&definition, SL("isNumeric"), 1, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &numeric_size, PH_COPY | PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 1, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("varying") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("varying"))) {
phalcon_array_update_string_long(&definition, SL("type"), 2, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &char_size, PH_COPY | PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("date") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("date"))) {
phalcon_array_update_string_long(&definition, SL("type"), 1, PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("size"), 0, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("numeric") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("numeric"))) {
phalcon_array_update_string_long(&definition, SL("type"), 3, PH_SEPARATE);
phalcon_array_update_string_bool(&definition, SL("isNumeric"), 1, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &numeric_size, PH_COPY | PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 32, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("char") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("char"))) {
phalcon_array_update_string_long(&definition, SL("type"), 5, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &char_size, PH_COPY | PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("timestamp") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("timestamp"))) {
phalcon_array_update_string_long(&definition, SL("type"), 4, PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("size"), 0, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("text") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("text"))) {
phalcon_array_update_string_long(&definition, SL("type"), 6, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &char_size, PH_COPY | PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("float") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("float"))) {
phalcon_array_update_string_long(&definition, SL("type"), 7, PH_SEPARATE);
phalcon_array_update_string_bool(&definition, SL("isNumeric"), 1, PH_SEPARATE);
phalcon_array_update_string(&definition, SL("size"), &numeric_size, PH_COPY | PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 32, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("bool") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("bool"))) {
phalcon_array_update_string_long(&definition, SL("type"), 8, PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("size"), 0, PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 5, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("uuid") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("uuid"))) {
phalcon_array_update_string_long(&definition, SL("type"), 5, PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("size"), 36, PH_SEPARATE);
} else {
@@ -255,7 +255,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Postgresql, describeColumns){
}
}
- if (phalcon_memnstr_str(column_type, SL("unsigned") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("unsigned"))) {
phalcon_array_update_string_bool(&definition, SL("unsigned"), 1, PH_SEPARATE);
}
diff --git a/ext/db/adapter/pdo/sqlite.c b/ext/db/adapter/pdo/sqlite.c
index 045266ac091..2b1b7b0ab48 100644
--- a/ext/db/adapter/pdo/sqlite.c
+++ b/ext/db/adapter/pdo/sqlite.c
@@ -178,7 +178,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns){
phalcon_array_fetch_long(&column_type, field, 2, PH_NOISY);
PHALCON_INIT_NVAR(pos);
- phalcon_fast_stripos_str(pos, column_type, SL("int") TSRMLS_CC);
+ phalcon_fast_stripos_str(pos, column_type, SL("int"));
if (PHALCON_IS_NOT_FALSE(pos)) {
phalcon_array_update_string_long(&definition, SL("type"), 0, PH_SEPARATE);
phalcon_array_update_string_bool(&definition, SL("isNumeric"), 1, PH_SEPARATE);
@@ -194,32 +194,32 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns){
phalcon_array_update_string_bool(&definition, SL("autoIncrement"), 1, PH_SEPARATE);
}
} else {
- if (phalcon_memnstr_str(column_type, SL("varchar") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("varchar"))) {
phalcon_array_update_string_long(&definition, SL("type"), 2, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("date") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("date"))) {
phalcon_array_update_string_long(&definition, SL("type"), 1, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("decimal") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("decimal"))) {
phalcon_array_update_string_long(&definition, SL("type"), 3, PH_SEPARATE);
phalcon_array_update_string_bool(&definition, SL("isNumeric"), 1, PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 32, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("char") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("char"))) {
phalcon_array_update_string_long(&definition, SL("type"), 5, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("datetime") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("datetime"))) {
phalcon_array_update_string_long(&definition, SL("type"), 4, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("text") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("text"))) {
phalcon_array_update_string_long(&definition, SL("type"), 6, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("float") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("float"))) {
phalcon_array_update_string_long(&definition, SL("type"), 7, PH_SEPARATE);
phalcon_array_update_string_bool(&definition, SL("isNumeric"), 1, PH_SEPARATE);
phalcon_array_update_string_long(&definition, SL("bindType"), 32, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(column_type, SL("enum") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("enum"))) {
phalcon_array_update_string_long(&definition, SL("type"), 5, PH_SEPARATE);
} else {
phalcon_array_update_string_long(&definition, SL("type"), 2, PH_SEPARATE);
@@ -233,7 +233,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns){
}
}
- if (phalcon_memnstr_str(column_type, SL("(") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("("))) {
PHALCON_INIT_NVAR(matches);
@@ -258,7 +258,7 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo_Sqlite, describeColumns){
}
}
- if (phalcon_memnstr_str(column_type, SL("unsigned") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(column_type, SL("unsigned"))) {
phalcon_array_update_string_bool(&definition, SL("unsigned"), 1, PH_SEPARATE);
}
diff --git a/ext/db/dialect/mysql.c b/ext/db/dialect/mysql.c
index 28be91ad3dc..3b38a04cda6 100755
--- a/ext/db/dialect/mysql.c
+++ b/ext/db/dialect/mysql.c
@@ -600,7 +600,7 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, _getTableOptions){
phalcon_array_fetch_string(&table_collation, options, SL("TABLE_COLLATION"), PH_NOISY);
if (zend_is_true(table_collation)) {
PHALCON_INIT_VAR(collation_parts);
- phalcon_fast_explode_str(collation_parts, SL("_"), table_collation TSRMLS_CC);
+ phalcon_fast_explode_str(collation_parts, SL("_"), table_collation);
PHALCON_OBS_VAR(first_part);
phalcon_array_fetch_long(&first_part, collation_parts, 0, PH_NOISY);
diff --git a/ext/debug.c b/ext/debug.c
index 6f84e2c5e95..2177e4fd331 100644
--- a/ext/debug.c
+++ b/ext/debug.c
@@ -281,7 +281,7 @@ PHP_METHOD(Phalcon_Debug, _escapeString){
ZVAL_STRING(escaped_line_break, "\\n", 1);
PHALCON_INIT_VAR(replaced_value);
- phalcon_fast_str_replace(replaced_value, line_break, escaped_line_break, value TSRMLS_CC);
+ phalcon_fast_str_replace(replaced_value, line_break, escaped_line_break, value);
phalcon_call_func_p3(return_value, "htmlentities", replaced_value, ent_compat, charset);
RETURN_MM();
}
@@ -516,7 +516,7 @@ PHP_METHOD(Phalcon_Debug, getMajorVersion){
PHALCON_CALL_STATIC(version, "phalcon\\version", "get");
PHALCON_INIT_VAR(parts);
- phalcon_fast_explode_str(parts, SL(" "), version TSRMLS_CC);
+ phalcon_fast_explode_str(parts, SL(" "), version);
PHALCON_OBS_VAR(major);
phalcon_array_fetch_long(&major, parts, 0, PH_NOISY);
@@ -659,7 +659,7 @@ PHP_METHOD(Phalcon_Debug, showTraceItem){
* Prepare the class name according to the Phalcon's conventions
*/
PHALCON_INIT_VAR(prepare_uri_class);
- phalcon_fast_str_replace(prepare_uri_class, namespace_separator, underscore, class_name TSRMLS_CC);
+ phalcon_fast_str_replace(prepare_uri_class, namespace_separator, underscore, class_name);
/**
* Generate a link to the official docs
@@ -683,7 +683,7 @@ PHP_METHOD(Phalcon_Debug, showTraceItem){
phalcon_fast_strtolower(lower_class_name, class_name);
PHALCON_INIT_VAR(prepare_internal_class);
- phalcon_fast_str_replace(prepare_internal_class, underscore, minus, lower_class_name TSRMLS_CC);
+ phalcon_fast_str_replace(prepare_internal_class, underscore, minus, lower_class_name);
/**
* Generate a link to the official docs
@@ -735,7 +735,7 @@ PHP_METHOD(Phalcon_Debug, showTraceItem){
* Prepare function's name according to the conventions in the docs
*/
PHALCON_INIT_VAR(prepared_function_name);
- phalcon_fast_str_replace(prepared_function_name, underscore, minus, function_name TSRMLS_CC);
+ phalcon_fast_str_replace(prepared_function_name, underscore, minus, function_name);
PHALCON_SCONCAT_SVSVS(html, "", function_name, "");
} else {
PHALCON_SCONCAT_SVS(html, "", function_name, "");
@@ -939,7 +939,7 @@ PHP_METHOD(Phalcon_Debug, showTraceItem){
if (zend_is_true(is_comment)) {
PHALCON_INIT_NVAR(spaced_current_line);
- phalcon_fast_str_replace(spaced_current_line, comment, space, current_line TSRMLS_CC);
+ phalcon_fast_str_replace(spaced_current_line, comment, space, current_line);
PHALCON_CPY_WRT(current_line, spaced_current_line);
}
}
@@ -956,7 +956,7 @@ PHP_METHOD(Phalcon_Debug, showTraceItem){
phalcon_concat_self_str(&html, SL(" \n") TSRMLS_CC);
} else {
PHALCON_INIT_NVAR(spaced_current_line);
- phalcon_fast_str_replace(spaced_current_line, tab, two_spaces, current_line TSRMLS_CC);
+ phalcon_fast_str_replace(spaced_current_line, tab, two_spaces, current_line);
PHALCON_INIT_NVAR(escaped_line);
phalcon_call_func_p3(escaped_line, "htmlentities", spaced_current_line, ent_compat, utf8);
diff --git a/ext/di.c b/ext/di.c
index d9b96acb8b3..9f3d7017633 100644
--- a/ext/di.c
+++ b/ext/di.c
@@ -628,7 +628,7 @@ PHP_METHOD(Phalcon_DI, __call){
phalcon_read_property_this(&services, this_ptr, SL("_services"), PH_NOISY_CC);
PHALCON_INIT_VAR(service_name);
- phalcon_substr(service_name, method, 3, 0 TSRMLS_CC);
+ phalcon_substr(service_name, method, 3, 0);
PHALCON_INIT_VAR(possible_service);
phalcon_call_func_p1(possible_service, "lcfirst", service_name);
@@ -651,7 +651,7 @@ PHP_METHOD(Phalcon_DI, __call){
if (phalcon_start_with_str(method, SL("set"))) {
if (phalcon_array_isset_long(arguments, 0)) {
PHALCON_INIT_NVAR(service_name);
- phalcon_substr(service_name, method, 3, 0 TSRMLS_CC);
+ phalcon_substr(service_name, method, 3, 0);
PHALCON_INIT_NVAR(possible_service);
phalcon_call_func_p1(possible_service, "lcfirst", service_name);
diff --git a/ext/dispatcher.c b/ext/dispatcher.c
index be4f169902e..86fc5f4ca58 100644
--- a/ext/dispatcher.c
+++ b/ext/dispatcher.c
@@ -597,9 +597,9 @@ PHP_METHOD(Phalcon_Dispatcher, dispatch){
/**
* We don't camelize the classes if they are in namespaces
*/
- if (!phalcon_memnstr_str(handler_name, SL("\\") TSRMLS_CC)) {
+ if (!phalcon_memnstr_str(handler_name, SL("\\"))) {
PHALCON_INIT_NVAR(camelized_class);
- phalcon_camelize(camelized_class, handler_name TSRMLS_CC);
+ phalcon_camelize(camelized_class, handler_name);
} else {
PHALCON_CPY_WRT(camelized_class, handler_name);
}
diff --git a/ext/escaper.c b/ext/escaper.c
index bc0b6ce1ffa..a2ee2a7ee0c 100644
--- a/ext/escaper.c
+++ b/ext/escaper.c
@@ -400,11 +400,8 @@ PHP_METHOD(Phalcon_Escaper, escapeUrl){
zval *url;
- PHALCON_MM_GROW();
-
phalcon_fetch_params(1, 1, 0, &url);
phalcon_raw_url_encode(return_value, url);
- RETURN_MM();
}
diff --git a/ext/events/manager.c b/ext/events/manager.c
index 2ac788bbac1..c95df87f11f 100755
--- a/ext/events/manager.c
+++ b/ext/events/manager.c
@@ -585,7 +585,7 @@ PHP_METHOD(Phalcon_Events_Manager, fire){
/**
* All valid events must have a colon separator
*/
- if (!phalcon_memnstr_str(event_type, SL(":") TSRMLS_CC)) {
+ if (!phalcon_memnstr_str(event_type, SL(":"))) {
PHALCON_INIT_VAR(exception_message);
PHALCON_CONCAT_SV(exception_message, "Invalid event type ", event_type);
PHALCON_THROW_EXCEPTION_ZVAL(phalcon_events_exception_ce, exception_message);
@@ -593,7 +593,7 @@ PHP_METHOD(Phalcon_Events_Manager, fire){
}
PHALCON_INIT_VAR(event_parts);
- phalcon_fast_explode_str(event_parts, SL(":"), event_type TSRMLS_CC);
+ phalcon_fast_explode_str(event_parts, SL(":"), event_type);
PHALCON_OBS_VAR(type);
phalcon_array_fetch_long(&type, event_parts, 0, PH_NOISY);
diff --git a/ext/filter.c b/ext/filter.c
index e44323cebda..0b330e8e23f 100755
--- a/ext/filter.c
+++ b/ext/filter.c
@@ -254,7 +254,7 @@ PHP_METHOD(Phalcon_Filter, _sanitize){
ZVAL_STRING(empty_str, "", 1);
PHALCON_INIT_VAR(escaped);
- phalcon_fast_str_replace(escaped, quote, empty_str, value TSRMLS_CC);
+ phalcon_fast_str_replace(escaped, quote, empty_str, value);
PHALCON_INIT_VAR(filtered);
phalcon_call_func_p2(filtered, "filter_var", escaped, type);
diff --git a/ext/http/request.c b/ext/http/request.c
index 1c83d38c2ab..ad9ef3006cc 100755
--- a/ext/http/request.c
+++ b/ext/http/request.c
@@ -551,7 +551,7 @@ PHP_METHOD(Phalcon_Http_Request, isSoapRequested){
PHALCON_OBS_VAR(content_type);
phalcon_array_fetch_string(&content_type, server, SL("CONTENT_TYPE"), PH_NOISY);
- if (phalcon_memnstr_str(content_type, SL("application/soap+xml") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(content_type, SL("application/soap+xml"))) {
RETURN_MM_TRUE;
}
}
@@ -828,12 +828,12 @@ PHP_METHOD(Phalcon_Http_Request, getClientAddress){
}
if (Z_TYPE_P(address) == IS_STRING) {
- if (phalcon_memnstr_str(address, SL(",") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(address, SL(","))) {
/**
* The client address has multiples parts, only return the first part
*/
PHALCON_INIT_VAR(addresses);
- phalcon_fast_explode_str(addresses, SL(","), address TSRMLS_CC);
+ phalcon_fast_explode_str(addresses, SL(","), address);
PHALCON_OBS_VAR(first);
phalcon_array_fetch_long(&first, addresses, 0, PH_NOISY);
@@ -1245,7 +1245,7 @@ PHP_METHOD(Phalcon_Http_Request, getHeaders){
if (phalcon_start_with(key, http, NULL)) {
PHALCON_INIT_NVAR(header);
- phalcon_fast_str_replace(header, http, empty_string, key TSRMLS_CC);
+ phalcon_fast_str_replace(header, http, empty_string, key);
phalcon_array_update_zval(&headers, key, &value, PH_COPY | PH_SEPARATE);
}
@@ -1316,13 +1316,13 @@ PHP_METHOD(Phalcon_Http_Request, _getQualityHeader){
PHALCON_GET_HVALUE(part);
PHALCON_INIT_NVAR(header_parts);
- phalcon_fast_explode_str(header_parts, SL(";"), part TSRMLS_CC);
+ phalcon_fast_explode_str(header_parts, SL(";"), part);
if (phalcon_array_isset_long(header_parts, 1)) {
PHALCON_OBS_NVAR(quality_part);
phalcon_array_fetch_long(&quality_part, header_parts, 1, PH_NOISY);
PHALCON_INIT_NVAR(quality);
- phalcon_substr(quality, quality_part, 2, 0 TSRMLS_CC);
+ phalcon_substr(quality, quality_part, 2, 0);
} else {
PHALCON_CPY_WRT(quality, quality_one);
}
diff --git a/ext/kernel/string.c b/ext/kernel/string.c
index 5dd650e413c..8ed864f985e 100644
--- a/ext/kernel/string.c
+++ b/ext/kernel/string.c
@@ -98,7 +98,7 @@ void phalcon_fast_join(zval *result, zval *glue, zval *pieces TSRMLS_DC){
if (Z_TYPE_P(glue) != IS_STRING || Z_TYPE_P(pieces) != IS_ARRAY) {
ZVAL_NULL(result);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for join()");
+ zend_error(E_WARNING, "Invalid arguments supplied for join()");
return;
}
@@ -118,11 +118,8 @@ void phalcon_append_printable_zval(smart_str *implstr, zval **tmp TSRMLS_DC) {
smart_str_appendl(implstr, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
break;
- case IS_LONG: {
- char stmp[MAX_LENGTH_OF_LONG + 1];
- str_len = slprintf(stmp, sizeof(stmp), "%ld", Z_LVAL_PP(tmp));
- smart_str_appendl(implstr, stmp, str_len);
- }
+ case IS_LONG:
+ smart_str_append_long(implstr, Z_LVAL_PP(tmp));
break;
case IS_BOOL:
@@ -211,14 +208,14 @@ void phalcon_fast_join_str(zval *return_value, char *glue, unsigned int glue_len
/**
* Convert dash/underscored texts returning camelized
*/
-void phalcon_camelize(zval *return_value, const zval *str TSRMLS_DC){
+void phalcon_camelize(zval *return_value, const zval *str){
unsigned int i;
smart_str camelize_str = {0};
char *marker, ch;
if (Z_TYPE_P(str) != IS_STRING) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for camelize()");
+ zend_error(E_WARNING, "Invalid arguments supplied for camelize()");
RETURN_EMPTY_STRING();
return;
}
@@ -263,14 +260,14 @@ void phalcon_camelize(zval *return_value, const zval *str TSRMLS_DC){
/**
* Convert dash/underscored texts returning camelized
*/
-void phalcon_uncamelize(zval *return_value, const zval *str TSRMLS_DC){
+void phalcon_uncamelize(zval *return_value, const zval *str){
unsigned int i;
smart_str uncamelize_str = {0};
char *marker, ch;
if (Z_TYPE_P(str) != IS_STRING) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for camelize()");
+ zend_error(E_WARNING, "Invalid arguments supplied for camelize()");
return;
}
@@ -302,11 +299,11 @@ void phalcon_uncamelize(zval *return_value, const zval *str TSRMLS_DC){
/**
* Fast call to explode php function
*/
-void phalcon_fast_explode(zval *result, zval *delimiter, zval *str TSRMLS_DC){
+void phalcon_fast_explode(zval *result, zval *delimiter, zval *str){
if (Z_TYPE_P(str) != IS_STRING || Z_TYPE_P(delimiter) != IS_STRING) {
ZVAL_NULL(result);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for explode()");
+ zend_error(E_WARNING, "Invalid arguments supplied for explode()");
return;
}
@@ -317,13 +314,13 @@ void phalcon_fast_explode(zval *result, zval *delimiter, zval *str TSRMLS_DC){
/**
* Fast call to explode php function
*/
-void phalcon_fast_explode_str(zval *result, const char *delimiter, int delimiter_length, zval *str TSRMLS_DC){
+void phalcon_fast_explode_str(zval *result, const char *delimiter, int delimiter_length, zval *str){
zval delimiter_zval;
if (Z_TYPE_P(str) != IS_STRING) {
ZVAL_NULL(result);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for explode()");
+ zend_error(E_WARNING, "Invalid arguments supplied for explode()");
return;
}
@@ -336,12 +333,12 @@ void phalcon_fast_explode_str(zval *result, const char *delimiter, int delimiter
/**
* Check if a string is contained into another
*/
-int phalcon_memnstr(const zval *haystack, const zval *needle TSRMLS_DC) {
+int phalcon_memnstr(const zval *haystack, const zval *needle) {
char *found = NULL;
if (Z_TYPE_P(haystack) != IS_STRING || Z_TYPE_P(needle) != IS_STRING) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for memnstr()");
+ zend_error(E_WARNING, "Invalid arguments supplied for memnstr()");
return 0;
}
@@ -359,12 +356,12 @@ int phalcon_memnstr(const zval *haystack, const zval *needle TSRMLS_DC) {
/**
* Check if a string is contained into another
*/
-int phalcon_memnstr_str(const zval *haystack, char *needle, unsigned int needle_length TSRMLS_DC) {
+int phalcon_memnstr_str(const zval *haystack, char *needle, unsigned int needle_length) {
char *found = NULL;
if (Z_TYPE_P(haystack) != IS_STRING) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for memnstr()");
+ zend_error(E_WARNING, "Invalid arguments supplied for memnstr()");
return 0;
}
@@ -382,18 +379,19 @@ int phalcon_memnstr_str(const zval *haystack, char *needle, unsigned int needle_
/**
* Inmediate function resolution for strpos function
*/
-void phalcon_fast_strpos(zval *return_value, const zval *haystack, const zval *needle TSRMLS_DC) {
+void phalcon_fast_strpos(zval *return_value, const zval *haystack, const zval *needle) {
char *found = NULL;
if (Z_TYPE_P(haystack) != IS_STRING || Z_TYPE_P(needle) != IS_STRING) {
ZVAL_NULL(return_value);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for strpos()");
+ zend_error(E_WARNING, "Invalid arguments supplied for strpos()");
return;
}
if (!Z_STRLEN_P(needle)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter");
+ ZVAL_NULL(return_value);
+ zend_error(E_WARNING, "Empty delimiter");
return;
}
@@ -410,13 +408,13 @@ void phalcon_fast_strpos(zval *return_value, const zval *haystack, const zval *n
/**
* Inmediate function resolution for strpos function
*/
-void phalcon_fast_strpos_str(zval *return_value, const zval *haystack, char *needle, unsigned int needle_length TSRMLS_DC) {
+void phalcon_fast_strpos_str(zval *return_value, const zval *haystack, char *needle, unsigned int needle_length) {
char *found = NULL;
if (Z_TYPE_P(haystack) != IS_STRING) {
ZVAL_NULL(return_value);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for strpos()");
+ zend_error(E_WARNING, "Invalid arguments supplied for strpos()");
return;
}
@@ -433,14 +431,14 @@ void phalcon_fast_strpos_str(zval *return_value, const zval *haystack, char *nee
/**
* Inmediate function resolution for stripos function
*/
-void phalcon_fast_stripos_str(zval *return_value, zval *haystack, char *needle, unsigned int needle_length TSRMLS_DC) {
+void phalcon_fast_stripos_str(zval *return_value, zval *haystack, char *needle, unsigned int needle_length) {
char *found = NULL;
char *needle_dup, *haystack_dup;
if (Z_TYPE_P(haystack) != IS_STRING) {
ZVAL_NULL(return_value);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for stripos()");
+ zend_error(E_WARNING, "Invalid arguments supplied for stripos()");
return;
}
@@ -467,14 +465,14 @@ void phalcon_fast_stripos_str(zval *return_value, zval *haystack, char *needle,
/**
* Inmediate function resolution for str_replace function
*/
-void phalcon_fast_str_replace(zval *return_value, zval *search, zval *replace, zval *subject TSRMLS_DC) {
+void phalcon_fast_str_replace(zval *return_value, zval *search, zval *replace, zval *subject) {
zval replace_copy, search_copy;
int copy_replace = 0, copy_search = 0;
if (Z_TYPE_P(subject) != IS_STRING) {
ZVAL_NULL(return_value);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for str_replace()");
+ zend_error(E_WARNING, "Invalid arguments supplied for str_replace()");
return;
}
@@ -969,15 +967,11 @@ int phalcon_spprintf(char **message, int max_len, char *format, ...)
/**
* Makes a substr like the PHP function. This function doesn't support negative lengths
*/
-void phalcon_substr(zval *return_value, zval *str, unsigned long from, unsigned long length TSRMLS_DC) {
+void phalcon_substr(zval *return_value, zval *str, unsigned long from, unsigned long length) {
if (Z_TYPE_P(str) != IS_STRING) {
- if (Z_TYPE_P(str) == IS_NULL) {
- RETURN_FALSE;
- }
-
- if (Z_TYPE_P(str) == IS_BOOL) {
+ if (Z_TYPE_P(str) == IS_NULL || Z_TYPE_P(str) == IS_BOOL) {
RETURN_FALSE;
}
@@ -985,7 +979,7 @@ void phalcon_substr(zval *return_value, zval *str, unsigned long from, unsigned
RETURN_EMPTY_STRING();
}
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for phalcon_substr()");
+ zend_error(E_WARNING, "Invalid arguments supplied for phalcon_substr()");
RETURN_FALSE;
}
@@ -1195,7 +1189,7 @@ void phalcon_preg_match(zval *return_value, zval *regex, zval *subject, zval *ma
pcre_cache_entry *pce;
if (Z_TYPE_P(regex) != IS_STRING) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments supplied for phalcon_preg_match()");
+ zend_error(E_WARNING, "Invalid arguments supplied for phalcon_preg_match()");
RETURN_FALSE;
}
diff --git a/ext/kernel/string.h b/ext/kernel/string.h
index ef2ddf88138..e54eda8440a 100644
--- a/ext/kernel/string.h
+++ b/ext/kernel/string.h
@@ -22,27 +22,27 @@
#define PHALCON_TRIM_BOTH 3
/** Fast char position */
-extern int phalcon_memnstr(const zval *haystack, const zval *needle TSRMLS_DC);
-extern int phalcon_memnstr_str(const zval *haystack, char *needle, unsigned int needle_length TSRMLS_DC);
+extern int phalcon_memnstr(const zval *haystack, const zval *needle);
+extern int phalcon_memnstr_str(const zval *haystack, char *needle, unsigned int needle_length);
/** Function replacement */
extern void phalcon_fast_strlen(zval *return_value, zval *str);
extern void phalcon_fast_strtolower(zval *return_value, zval *str);
extern void phalcon_fast_join(zval *result, zval *glue, zval *pieces TSRMLS_DC);
extern void phalcon_fast_join_str(zval *result, char *glue, unsigned int glue_length, zval *pieces TSRMLS_DC);
-extern void phalcon_fast_explode(zval *result, zval *delimiter, zval *str TSRMLS_DC);
-extern void phalcon_fast_explode_str(zval *result, const char *delimiter, int delimiter_length, zval *str TSRMLS_DC);
-extern void phalcon_fast_strpos(zval *return_value, const zval *haystack, const zval *needle TSRMLS_DC);
-extern void phalcon_fast_strpos_str(zval *return_value, const zval *haystack, char *needle, unsigned int needle_length TSRMLS_DC);
-extern void phalcon_fast_stripos_str(zval *return_value, zval *haystack, char *needle, unsigned int needle_length TSRMLS_DC);
-extern void phalcon_fast_str_replace(zval *return_value, zval *search, zval *replace, zval *subject TSRMLS_DC);
+extern void phalcon_fast_explode(zval *result, zval *delimiter, zval *str);
+extern void phalcon_fast_explode_str(zval *result, const char *delimiter, int delimiter_length, zval *str);
+extern void phalcon_fast_strpos(zval *return_value, const zval *haystack, const zval *needle);
+extern void phalcon_fast_strpos_str(zval *return_value, const zval *haystack, char *needle, unsigned int needle_length);
+extern void phalcon_fast_stripos_str(zval *return_value, zval *haystack, char *needle, unsigned int needle_length);
+extern void phalcon_fast_str_replace(zval *return_value, zval *search, zval *replace, zval *subject);
extern void phalcon_fast_trim(zval *return_value, zval *str, int where TSRMLS_DC);
extern void phalcon_fast_strip_tags(zval *return_value, zval *str);
extern void phalcon_fast_strtoupper(zval *return_value, zval *str);
/** Camelize/Uncamelize */
-extern void phalcon_camelize(zval *return_value, const zval *str TSRMLS_DC);
-extern void phalcon_uncamelize(zval *return_value, const zval *str TSRMLS_DC);
+extern void phalcon_camelize(zval *return_value, const zval *str);
+extern void phalcon_uncamelize(zval *return_value, const zval *str);
/** Starts/Ends with */
extern int phalcon_start_with(const zval *str, const zval *compared, zval *ignore_case);
@@ -64,7 +64,7 @@ extern void phalcon_unique_key(zval *return_value, zval *prefix, zval *value TSR
extern int phalcon_spprintf(char **message, int max_len, char *format, ...);
/* Substr */
-void phalcon_substr(zval *return_value, zval *str, unsigned long from, unsigned long length TSRMLS_DC);
+void phalcon_substr(zval *return_value, zval *str, unsigned long from, unsigned long length);
/** EOL */
zval *phalcon_eol(int eol TSRMLS_DC);
diff --git a/ext/loader.c b/ext/loader.c
index ad091054c50..3c9956784f3 100644
--- a/ext/loader.c
+++ b/ext/loader.c
@@ -678,13 +678,13 @@ PHP_METHOD(Phalcon_Loader, autoLoad){
* Change the pseudo-separator by the directory separator in the class name
*/
PHALCON_INIT_VAR(ds_class_name);
- phalcon_fast_str_replace(ds_class_name, pseudo_separator, ds, class_name TSRMLS_CC);
+ phalcon_fast_str_replace(ds_class_name, pseudo_separator, ds, class_name);
/**
* And change the namespace separator by directory separator too
*/
PHALCON_INIT_VAR(ns_class_name);
- phalcon_fast_str_replace(ns_class_name, namespace_separator, ds, ds_class_name TSRMLS_CC);
+ phalcon_fast_str_replace(ns_class_name, namespace_separator, ds, ds_class_name);
/**
* Checking in directories
diff --git a/ext/logger/adapter/file.c b/ext/logger/adapter/file.c
index 89ff2ed7445..556a021f8bc 100644
--- a/ext/logger/adapter/file.c
+++ b/ext/logger/adapter/file.c
@@ -92,7 +92,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_File, __construct){
PHALCON_OBS_VAR(mode);
phalcon_array_fetch_string(&mode, options, SL("mode"), PH_NOISY);
- if (phalcon_memnstr_str(mode, SL("r") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(mode, SL("r"))) {
PHALCON_THROW_EXCEPTION_STR(phalcon_logger_exception_ce, "Logger must be opened in append or write mode");
return;
}
diff --git a/ext/logger/adapter/stream.c b/ext/logger/adapter/stream.c
index 4f2cf56dcac..d5f59e501e8 100644
--- a/ext/logger/adapter/stream.c
+++ b/ext/logger/adapter/stream.c
@@ -89,7 +89,7 @@ PHP_METHOD(Phalcon_Logger_Adapter_Stream, __construct){
PHALCON_OBS_VAR(mode);
phalcon_array_fetch_string(&mode, options, SL("mode"), PH_NOISY);
- if (phalcon_memnstr_str(mode, SL("r") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(mode, SL("r"))) {
PHALCON_THROW_EXCEPTION_STR(phalcon_logger_exception_ce, "Stream must be opened in append or write mode");
return;
}
diff --git a/ext/logger/formatter/line.c b/ext/logger/formatter/line.c
index 85c05f241fa..4aedc82d362 100644
--- a/ext/logger/formatter/line.c
+++ b/ext/logger/formatter/line.c
@@ -167,7 +167,7 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, format){
/**
* Check if the format has the %date% placeholder
*/
- if (phalcon_memnstr_str(format, SL("%date%") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(format, SL("%date%"))) {
PHALCON_OBS_VAR(date_format);
phalcon_read_property_this(&date_format, this_ptr, SL("_dateFormat"), PH_NOISY_CC);
@@ -178,7 +178,7 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, format){
ZVAL_STRING(date_wildcard, "%date%", 1);
PHALCON_INIT_VAR(new_format);
- phalcon_fast_str_replace(new_format, date_wildcard, date, format TSRMLS_CC);
+ phalcon_fast_str_replace(new_format, date_wildcard, date, format);
} else {
PHALCON_CPY_WRT(new_format, format);
}
@@ -186,7 +186,7 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, format){
/**
* Check if the format has the %type% placeholder
*/
- if (phalcon_memnstr_str(format, SL("%type%") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(format, SL("%type%"))) {
PHALCON_INIT_VAR(type_string);
phalcon_call_method_p1(type_string, this_ptr, "gettypestring", type);
@@ -194,7 +194,7 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, format){
ZVAL_STRING(type_wildcard, "%type%", 1);
PHALCON_INIT_NVAR(format);
- phalcon_fast_str_replace(format, type_wildcard, type_string, new_format TSRMLS_CC);
+ phalcon_fast_str_replace(format, type_wildcard, type_string, new_format);
} else {
PHALCON_CPY_WRT(format, new_format);
}
@@ -203,7 +203,7 @@ PHP_METHOD(Phalcon_Logger_Formatter_Line, format){
ZVAL_STRING(message_wildcard, "%message%", 1);
PHALCON_INIT_NVAR(new_format);
- phalcon_fast_str_replace(new_format, message_wildcard, message, format TSRMLS_CC);
+ phalcon_fast_str_replace(new_format, message_wildcard, message, format);
PHALCON_INIT_VAR(eol);
ZVAL_STRING(eol, PHP_EOL, 1);
diff --git a/ext/mvc/collection.c b/ext/mvc/collection.c
index 763ed545cd7..ae87a98f754 100644
--- a/ext/mvc/collection.c
+++ b/ext/mvc/collection.c
@@ -369,7 +369,7 @@ PHP_METHOD(Phalcon_Mvc_Collection, getSource){
phalcon_get_class_ns(class_name, this_ptr, 0 TSRMLS_CC);
PHALCON_INIT_NVAR(source);
- phalcon_uncamelize(source, class_name TSRMLS_CC);
+ phalcon_uncamelize(source, class_name);
phalcon_update_property_this(this_ptr, SL("_source"), source TSRMLS_CC);
}
diff --git a/ext/mvc/model.c b/ext/mvc/model.c
index 40ab49c8fc5..fff66e19ba2 100755
--- a/ext/mvc/model.c
+++ b/ext/mvc/model.c
@@ -5915,7 +5915,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _getRelatedRecords){
*/
if (phalcon_start_with_str(method, SL("get"))) {
PHALCON_INIT_VAR(alias);
- phalcon_substr(alias, method, 3, 0 TSRMLS_CC);
+ phalcon_substr(alias, method, 3, 0);
phalcon_call_method_p2(relation, manager, "getrelationbyalias", model_name, alias);
}
@@ -5928,7 +5928,7 @@ PHP_METHOD(Phalcon_Mvc_Model, _getRelatedRecords){
ZVAL_STRING(query_method, "count", 1);
PHALCON_INIT_NVAR(alias);
- phalcon_substr(alias, method, 5, 0 TSRMLS_CC);
+ phalcon_substr(alias, method, 5, 0);
PHALCON_INIT_NVAR(relation);
phalcon_call_method_p2(relation, manager, "getrelationbyalias", model_name, alias);
@@ -6050,7 +6050,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __callStatic){
PHALCON_INIT_VAR(type);
ZVAL_STRING(type, "findFirst", 1);
- phalcon_substr(extra_method, method, 11, 0 TSRMLS_CC);
+ phalcon_substr(extra_method, method, 11, 0);
}
/**
@@ -6062,7 +6062,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __callStatic){
ZVAL_STRING(type, "find", 1);
PHALCON_INIT_NVAR(extra_method);
- phalcon_substr(extra_method, method, 6, 0 TSRMLS_CC);
+ phalcon_substr(extra_method, method, 6, 0);
}
}
@@ -6075,7 +6075,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __callStatic){
ZVAL_STRING(type, "count", 1);
PHALCON_INIT_NVAR(extra_method);
- phalcon_substr(extra_method, method, 7, 0 TSRMLS_CC);
+ phalcon_substr(extra_method, method, 7, 0);
}
}
@@ -6148,7 +6148,7 @@ PHP_METHOD(Phalcon_Mvc_Model, __callStatic){
* Get the possible real method name
*/
PHALCON_INIT_NVAR(field);
- phalcon_uncamelize(field, extra_method TSRMLS_CC);
+ phalcon_uncamelize(field, extra_method);
if (!phalcon_array_isset(attributes, field)) {
PHALCON_INIT_NVAR(exception_message);
PHALCON_CONCAT_SVS(exception_message, "Cannot resolve attribute \"", extra_method, "' in the model");
diff --git a/ext/mvc/model/manager.c b/ext/mvc/model/manager.c
index ebbb6369232..81f47de2058 100755
--- a/ext/mvc/model/manager.c
+++ b/ext/mvc/model/manager.c
@@ -444,7 +444,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, getModelSource){
phalcon_get_class_ns(class_name, model, 0 TSRMLS_CC);
PHALCON_INIT_NVAR(source);
- phalcon_uncamelize(source, class_name TSRMLS_CC);
+ phalcon_uncamelize(source, class_name);
phalcon_update_property_array(this_ptr, SL("_sources"), entity_name, source TSRMLS_CC);
RETURN_CCTOR(source);
diff --git a/ext/mvc/model/query.c b/ext/mvc/model/query.c
index ea03786ff11..5d48eb916de 100755
--- a/ext/mvc/model/query.c
+++ b/ext/mvc/model/query.c
@@ -836,7 +836,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getExpression){
/**
* Check if static literals have single quotes and escape them
*/
- if (phalcon_memnstr_str(value, SL("'") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(value, SL("'"))) {
PHALCON_INIT_VAR(escaped_value);
phalcon_orm_singlequotes(escaped_value, value TSRMLS_CC);
} else {
@@ -866,7 +866,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getExpression){
ZVAL_STRING(double_colon, ":", 1);
PHALCON_INIT_VAR(placeholder);
- phalcon_fast_str_replace(placeholder, question_mark, double_colon, value TSRMLS_CC);
+ phalcon_fast_str_replace(placeholder, question_mark, double_colon, value);
PHALCON_INIT_NVAR(expr_return);
array_init_size(expr_return, 2);
@@ -4260,7 +4260,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeInsert){
phalcon_call_method_p1(insert_expr, dialect, "getsqlexpression", expr_value);
PHALCON_INIT_NVAR(wildcard);
- phalcon_fast_str_replace(wildcard, double_colon, empty_string, insert_expr TSRMLS_CC);
+ phalcon_fast_str_replace(wildcard, double_colon, empty_string, insert_expr);
if (!phalcon_array_isset(bind_params, wildcard)) {
PHALCON_INIT_NVAR(exception_message);
PHALCON_CONCAT_SVS(exception_message, "Bound parameter '", wildcard, "' cannot be replaced because it isn't in the placeholders list");
@@ -4282,7 +4282,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeInsert){
phalcon_call_method_p1(insert_expr, dialect, "getsqlexpression", expr_value);
PHALCON_INIT_NVAR(wildcard);
- phalcon_fast_str_replace(wildcard, double_colon, empty_string, insert_expr TSRMLS_CC);
+ phalcon_fast_str_replace(wildcard, double_colon, empty_string, insert_expr);
if (!phalcon_array_isset(bind_params, wildcard)) {
PHALCON_INIT_NVAR(exception_message);
PHALCON_CONCAT_SVS(exception_message, "Bound parameter '", wildcard, "' cannot be replaced because it's not in the placeholders list");
@@ -4604,7 +4604,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeUpdate){
phalcon_call_method_p1(update_expr, dialect, "getsqlexpression", expr_value);
PHALCON_INIT_NVAR(wildcard);
- phalcon_fast_str_replace(wildcard, double_colon, empty_string, update_expr TSRMLS_CC);
+ phalcon_fast_str_replace(wildcard, double_colon, empty_string, update_expr);
if (phalcon_array_isset(bind_params, wildcard)) {
PHALCON_OBS_NVAR(update_value);
phalcon_array_fetch(&update_value, bind_params, wildcard, PH_NOISY);
@@ -4629,7 +4629,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _executeUpdate){
phalcon_call_method_p1(update_expr, dialect, "getsqlexpression", expr_value);
PHALCON_INIT_NVAR(wildcard);
- phalcon_fast_str_replace(wildcard, double_colon, empty_string, update_expr TSRMLS_CC);
+ phalcon_fast_str_replace(wildcard, double_colon, empty_string, update_expr);
if (phalcon_array_isset(bind_params, wildcard)) {
PHALCON_OBS_NVAR(update_value);
phalcon_array_fetch(&update_value, bind_params, wildcard, PH_NOISY);
diff --git a/ext/mvc/model/query/builder.c b/ext/mvc/model/query/builder.c
index 02e0399fa7b..6b7620f2fcf 100644
--- a/ext/mvc/model/query/builder.c
+++ b/ext/mvc/model/query/builder.c
@@ -1578,7 +1578,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql){
if (phalcon_is_numeric(group_item)) {
phalcon_array_append(&group_items, group_item, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(group_item, SL(".") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(group_item, SL("."))) {
phalcon_array_append(&group_items, group_item, PH_SEPARATE);
} else {
PHALCON_INIT_NVAR(escaped_item);
@@ -1597,7 +1597,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql){
if (phalcon_is_numeric(group)) {
PHALCON_SCONCAT_SV(phql, " GROUP BY ", group);
} else {
- if (phalcon_memnstr_str(group, SL(".") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(group, SL("."))) {
PHALCON_SCONCAT_SV(phql, " GROUP BY ", group);
} else {
PHALCON_SCONCAT_SVS(phql, " GROUP BY [", group, "]");
@@ -1634,7 +1634,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Builder, getPhql){
if (phalcon_is_numeric(order_item)) {
phalcon_array_append(&order_items, order_item, PH_SEPARATE);
} else {
- if (phalcon_memnstr_str(order_item, SL(".") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(order_item, SL("."))) {
phalcon_array_append(&order_items, order_item, PH_SEPARATE);
} else {
PHALCON_INIT_NVAR(escaped_item);
diff --git a/ext/mvc/model/resultset/complex.c b/ext/mvc/model/resultset/complex.c
index 6abaf9807d2..a55042bd733 100755
--- a/ext/mvc/model/resultset/complex.c
+++ b/ext/mvc/model/resultset/complex.c
@@ -345,7 +345,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset_Complex, valid){
PHALCON_CPY_WRT(attribute, alias);
} else {
PHALCON_INIT_NVAR(n_alias);
- phalcon_fast_str_replace(n_alias, underscore, empty_str, alias TSRMLS_CC);
+ phalcon_fast_str_replace(n_alias, underscore, empty_str, alias);
PHALCON_CPY_WRT(attribute, n_alias);
}
}
diff --git a/ext/mvc/model/validator.c b/ext/mvc/model/validator.c
index 649999ab2f3..fabea892af1 100644
--- a/ext/mvc/model/validator.c
+++ b/ext/mvc/model/validator.c
@@ -114,7 +114,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Validator, appendMessage){
ZVAL_STRING(empty_string, "", 1);
PHALCON_INIT_NVAR(type);
- phalcon_fast_str_replace(type, suffix, empty_string, class_name TSRMLS_CC);
+ phalcon_fast_str_replace(type, suffix, empty_string, class_name);
}
PHALCON_INIT_VAR(model_message);
diff --git a/ext/mvc/router.c b/ext/mvc/router.c
index dfa25475fd0..53656fe8493 100644
--- a/ext/mvc/router.c
+++ b/ext/mvc/router.c
@@ -237,7 +237,7 @@ PHP_METHOD(Phalcon_Mvc_Router, getRewriteUri){
phalcon_array_fetch_string(&url, _SERVER, SL("REQUEST_URI"), PH_NOISY);
PHALCON_INIT_VAR(url_parts);
- phalcon_fast_explode_str(url_parts, SL("?"), url TSRMLS_CC);
+ phalcon_fast_explode_str(url_parts, SL("?"), url);
PHALCON_OBS_VAR(real_uri);
phalcon_array_fetch_long(&real_uri, url_parts, 0, PH_NOISY);
@@ -598,8 +598,8 @@ PHP_METHOD(Phalcon_Mvc_Router, handle){
/**
* Check if the hostname restriction is the same as the current in the route
*/
- if (phalcon_memnstr_str(hostname, SL("(") TSRMLS_CC)) {
- if (!phalcon_memnstr_str(hostname, SL("#") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(hostname, SL("("))) {
+ if (!phalcon_memnstr_str(hostname, SL("#"))) {
PHALCON_INIT_NVAR(regex_host_name);
PHALCON_CONCAT_SVS(regex_host_name, "#^", hostname, "$#");
} else {
@@ -630,7 +630,7 @@ PHP_METHOD(Phalcon_Mvc_Router, handle){
*/
PHALCON_INIT_NVAR(pattern);
phalcon_call_method(pattern, route, "getcompiledpattern");
- if (phalcon_memnstr_str(pattern, SL("^") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(pattern, SL("^"))) {
PHALCON_INIT_NVAR(route_found);
Z_SET_ISREF_P(matches);
@@ -881,13 +881,13 @@ PHP_METHOD(Phalcon_Mvc_Router, handle){
phalcon_array_fetch_string(¶ms_str, parts, SL("params"), PH_NOISY);
PHALCON_INIT_VAR(str_params);
- phalcon_substr(str_params, params_str, 1, 0 TSRMLS_CC);
+ phalcon_substr(str_params, params_str, 1, 0);
if (zend_is_true(str_params)) {
PHALCON_INIT_VAR(slash);
ZVAL_STRING(slash, "/", 1);
PHALCON_INIT_NVAR(params);
- phalcon_fast_explode(params, slash, str_params TSRMLS_CC);
+ phalcon_fast_explode(params, slash, str_params);
}
phalcon_array_unset_string(&parts, SS("params"), PH_SEPARATE);
diff --git a/ext/mvc/router/annotations.c b/ext/mvc/router/annotations.c
index eeb65a1c20c..f555cda6b07 100644
--- a/ext/mvc/router/annotations.c
+++ b/ext/mvc/router/annotations.c
@@ -245,7 +245,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle){
*/
PHALCON_OBS_NVAR(handler);
phalcon_array_fetch_long(&handler, scope, 1, PH_NOISY);
- if (phalcon_memnstr_str(handler, SL("\\") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(handler, SL("\\"))) {
/**
* Extract the real class name from the namespaced class
*/
@@ -256,7 +256,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle){
* The lowercased class name is used as controller
*/
PHALCON_INIT_NVAR(lower_controller_name);
- phalcon_uncamelize(lower_controller_name, controller_name TSRMLS_CC);
+ phalcon_uncamelize(lower_controller_name, controller_name);
/**
* Extract the namespace from the namespaced class
@@ -267,7 +267,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle){
PHALCON_CPY_WRT(controller_name, handler);
PHALCON_INIT_NVAR(lower_controller_name);
- phalcon_uncamelize(lower_controller_name, controller_name TSRMLS_CC);
+ phalcon_uncamelize(lower_controller_name, controller_name);
PHALCON_INIT_NVAR(namespace_name);
}
@@ -329,7 +329,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, handle){
if (Z_TYPE_P(method_annotations) == IS_ARRAY) {
PHALCON_INIT_NVAR(lowercased);
- phalcon_uncamelize(lowercased, handler TSRMLS_CC);
+ phalcon_uncamelize(lowercased, handler);
phalcon_is_iterable(method_annotations, &ah2, &hp2, 0, 0);
@@ -490,7 +490,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processActionAnnotation){
ZVAL_STRING(empty_str, "", 1);
PHALCON_INIT_VAR(real_action_name);
- phalcon_fast_str_replace(real_action_name, action_suffix, empty_str, action TSRMLS_CC);
+ phalcon_fast_str_replace(real_action_name, action_suffix, empty_str, action);
PHALCON_INIT_VAR(action_name);
phalcon_fast_strtolower(action_name, real_action_name);
diff --git a/ext/mvc/router/route.c b/ext/mvc/router/route.c
index 441b472281e..75a2fb224d4 100644
--- a/ext/mvc/router/route.c
+++ b/ext/mvc/router/route.c
@@ -153,7 +153,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, compilePattern){
/**
* If a pattern contains ':', maybe there are placeholders to replace
*/
- if (phalcon_memnstr_str(pattern, SL(":") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(pattern, SL(":"))) {
/**
* This is a pattern for valid identifiers
@@ -164,55 +164,55 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, compilePattern){
/**
* Replace the module part
*/
- if (phalcon_memnstr_str(pattern, SL("/:module") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(pattern, SL("/:module"))) {
PHALCON_INIT_VAR(wildcard);
ZVAL_STRING(wildcard, "/:module", 1);
PHALCON_CPY_WRT(pattern_copy, compiled_pattern);
PHALCON_INIT_NVAR(compiled_pattern);
- phalcon_fast_str_replace(compiled_pattern, wildcard, id_pattern, pattern_copy TSRMLS_CC);
+ phalcon_fast_str_replace(compiled_pattern, wildcard, id_pattern, pattern_copy);
}
/**
* Replace the controller placeholder
*/
- if (phalcon_memnstr_str(pattern, SL("/:controller") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(pattern, SL("/:controller"))) {
PHALCON_INIT_NVAR(wildcard);
ZVAL_STRING(wildcard, "/:controller", 1);
PHALCON_CPY_WRT(pattern_copy, compiled_pattern);
PHALCON_INIT_NVAR(compiled_pattern);
- phalcon_fast_str_replace(compiled_pattern, wildcard, id_pattern, pattern_copy TSRMLS_CC);
+ phalcon_fast_str_replace(compiled_pattern, wildcard, id_pattern, pattern_copy);
}
/**
* Replace the namespace placeholder
*/
- if (phalcon_memnstr_str(pattern, SL("/:namespace") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(pattern, SL("/:namespace"))) {
PHALCON_INIT_NVAR(wildcard);
ZVAL_STRING(wildcard, "/:namespace", 1);
PHALCON_CPY_WRT(pattern_copy, compiled_pattern);
PHALCON_INIT_NVAR(compiled_pattern);
- phalcon_fast_str_replace(compiled_pattern, wildcard, id_pattern, pattern_copy TSRMLS_CC);
+ phalcon_fast_str_replace(compiled_pattern, wildcard, id_pattern, pattern_copy);
}
/**
* Replace the action placeholder
*/
- if (phalcon_memnstr_str(pattern, SL("/:action") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(pattern, SL("/:action"))) {
PHALCON_INIT_NVAR(wildcard);
ZVAL_STRING(wildcard, "/:action", 1);
PHALCON_CPY_WRT(pattern_copy, compiled_pattern);
PHALCON_INIT_NVAR(compiled_pattern);
- phalcon_fast_str_replace(compiled_pattern, wildcard, id_pattern, pattern_copy TSRMLS_CC);
+ phalcon_fast_str_replace(compiled_pattern, wildcard, id_pattern, pattern_copy);
}
/**
* Replace the params placeholder
*/
- if (phalcon_memnstr_str(pattern, SL("/:params") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(pattern, SL("/:params"))) {
PHALCON_INIT_NVAR(wildcard);
ZVAL_STRING(wildcard, "/:params", 1);
@@ -221,13 +221,13 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, compilePattern){
PHALCON_CPY_WRT(pattern_copy, compiled_pattern);
PHALCON_INIT_NVAR(compiled_pattern);
- phalcon_fast_str_replace(compiled_pattern, wildcard, params_pattern, pattern_copy TSRMLS_CC);
+ phalcon_fast_str_replace(compiled_pattern, wildcard, params_pattern, pattern_copy);
}
/**
* Replace the int placeholder
*/
- if (phalcon_memnstr_str(pattern, SL("/:int") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(pattern, SL("/:int"))) {
PHALCON_INIT_NVAR(wildcard);
ZVAL_STRING(wildcard, "/:int", 1);
@@ -236,14 +236,14 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, compilePattern){
PHALCON_CPY_WRT(pattern_copy, compiled_pattern);
PHALCON_INIT_NVAR(compiled_pattern);
- phalcon_fast_str_replace(compiled_pattern, wildcard, int_pattern, pattern_copy TSRMLS_CC);
+ phalcon_fast_str_replace(compiled_pattern, wildcard, int_pattern, pattern_copy);
}
}
/**
* Check if the pattern has parantheses in order to add the regex delimiters
*/
- if (phalcon_memnstr_str(compiled_pattern, SL("(") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(compiled_pattern, SL("("))) {
PHALCON_CONCAT_SVS(return_value, "#^", compiled_pattern, "$#");
RETURN_MM();
}
@@ -251,7 +251,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, compilePattern){
/**
* Square brackets are also checked
*/
- if (phalcon_memnstr_str(compiled_pattern, SL("[") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(compiled_pattern, SL("["))) {
PHALCON_CONCAT_SVS(return_value, "#^", compiled_pattern, "$#");
RETURN_MM();
}
@@ -318,7 +318,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, reConfigure){
* Explode the short paths using the :: separator
*/
PHALCON_INIT_VAR(parts);
- phalcon_fast_explode_str(parts, SL("::"), paths TSRMLS_CC);
+ phalcon_fast_explode_str(parts, SL("::"), paths);
PHALCON_INIT_VAR(number_parts);
phalcon_fast_count(number_parts, parts TSRMLS_CC);
@@ -373,7 +373,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, reConfigure){
/**
* Check if we need to obtain the namespace
*/
- if (phalcon_memnstr_str(controller_name, SL("\\") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(controller_name, SL("\\"))) {
/**
* Extract the real class name from the namespaced class
@@ -401,7 +401,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, reConfigure){
* Always pass the controller to lowercase
*/
PHALCON_INIT_VAR(lower_name);
- phalcon_uncamelize(lower_name, real_class_name TSRMLS_CC);
+ phalcon_uncamelize(lower_name, real_class_name);
/**
* Update the controller path
@@ -432,7 +432,7 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, reConfigure){
* If the route starts with '#' we assume that it is a regular expression
*/
if (!phalcon_start_with_str(pattern, SL("#"))) {
- if (phalcon_memnstr_str(pattern, SL("{") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(pattern, SL("{"))) {
/**
* The route has named parameters so we need to extract them
*/
diff --git a/ext/mvc/view.c b/ext/mvc/view.c
index e64cac7c70f..35741c1826b 100755
--- a/ext/mvc/view.c
+++ b/ext/mvc/view.c
@@ -1262,9 +1262,9 @@ PHP_METHOD(Phalcon_Mvc_View, pick){
PHALCON_CPY_WRT(pick_view, render_view);
} else {
PHALCON_INIT_VAR(layout);
- if (phalcon_memnstr_str(render_view, SL("/") TSRMLS_CC)) {
+ if (phalcon_memnstr_str(render_view, SL("/"))) {
PHALCON_INIT_VAR(parts);
- phalcon_fast_explode_str(parts, SL("/"), render_view TSRMLS_CC);
+ phalcon_fast_explode_str(parts, SL("/"), render_view);
PHALCON_OBS_NVAR(layout);
phalcon_array_fetch_long(&layout, parts, 0, PH_NOISY);
diff --git a/ext/mvc/view/engine/volt.c b/ext/mvc/view/engine/volt.c
index 8cf3a5f9430..cac428f5682 100644
--- a/ext/mvc/view/engine/volt.c
+++ b/ext/mvc/view/engine/volt.c
@@ -277,7 +277,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt, isIncluded){
phalcon_call_func_p2(return_value, "mb_strpos", haystack, needle);
RETURN_MM();
}
- phalcon_fast_strpos(return_value, haystack, needle TSRMLS_CC);
+ phalcon_fast_strpos(return_value, haystack, needle);
RETURN_MM();
}
diff --git a/ext/mvc/view/engine/volt/compiler.c b/ext/mvc/view/engine/volt/compiler.c
index a2497f1d787..978df936642 100644
--- a/ext/mvc/view/engine/volt/compiler.c
+++ b/ext/mvc/view/engine/volt/compiler.c
@@ -767,7 +767,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall){
}
PHALCON_INIT_VAR(camelized);
- phalcon_camelize(camelized, name TSRMLS_CC);
+ phalcon_camelize(camelized, name);
PHALCON_INIT_VAR(method);
phalcon_call_func_p1(method, "lcfirst", camelized);
@@ -846,11 +846,11 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, functionCall){
}
if (PHALCON_IS_STRING(name, "version")) {
- RETURN_MM_STRING("Phalcon\Version::get()", 1);
+ RETURN_MM_STRING("Phalcon\\Version::get()", 1);
}
if (PHALCON_IS_STRING(name, "version_id")) {
- RETURN_MM_STRING("Phalcon\Version::getId()", 1);
+ RETURN_MM_STRING("Phalcon\\Version::getId()", 1);
}
/**
@@ -1703,7 +1703,7 @@ PHP_METHOD(Phalcon_Mvc_View_Engine_Volt_Compiler, expression){
ZVAL_STRING(escaped_quoute, "\\'", 1);
PHALCON_INIT_NVAR(escaped_string);
- phalcon_fast_str_replace(escaped_string, single_quote, escaped_quoute, value TSRMLS_CC);
+ phalcon_fast_str_replace(escaped_string, single_quote, escaped_quoute, value);
PHALCON_INIT_NVAR(expr_code);
PHALCON_CONCAT_SVS(expr_code, "'", escaped_string, "'");
diff --git a/ext/queue/beanstalk.c b/ext/queue/beanstalk.c
index 14b99ef9d46..90d2ec67af0 100644
--- a/ext/queue/beanstalk.c
+++ b/ext/queue/beanstalk.c
@@ -416,7 +416,7 @@ PHP_METHOD(Phalcon_Queue_Beanstalk, readStatus){
PHALCON_INIT_VAR(response);
phalcon_call_method(response, this_ptr, "read");
- phalcon_fast_explode_str(return_value, SL(" "), response TSRMLS_CC);
+ phalcon_fast_explode_str(return_value, SL(" "), response);
RETURN_MM();
}
diff --git a/ext/tag.c b/ext/tag.c
index bd066273587..cd1a5bce03b 100755
--- a/ext/tag.c
+++ b/ext/tag.c
@@ -578,7 +578,7 @@ PHP_METHOD(Phalcon_Tag, _inputField){
/**
* Automatically assign the id if the name is not an array
*/
- if (!phalcon_memnstr_str(id, SL("[") TSRMLS_CC)) {
+ if (!phalcon_memnstr_str(id, SL("["))) {
if (!phalcon_array_isset_string(params, SS("id"))) {
phalcon_array_update_string(¶ms, SL("id"), &id, PH_COPY | PH_SEPARATE);
}
@@ -685,7 +685,7 @@ PHP_METHOD(Phalcon_Tag, _inputFieldChecked){
/**
* Automatically assign the id if the name is not an array
*/
- if (!phalcon_memnstr_str(id, SL("[") TSRMLS_CC)) {
+ if (!phalcon_memnstr_str(id, SL("["))) {
if (!phalcon_array_isset_string(params, SS("id"))) {
phalcon_array_update_string(¶ms, SL("id"), &id, PH_COPY | PH_SEPARATE);
}
diff --git a/ext/tag/select.c b/ext/tag/select.c
index 0abfae50482..7c38d1c2043 100644
--- a/ext/tag/select.c
+++ b/ext/tag/select.c
@@ -114,7 +114,7 @@ PHP_METHOD(Phalcon_Tag_Select, selectField){
/**
* Automatically assign the id if the name is not an array
*/
- if (!phalcon_memnstr_str(id, SL("[") TSRMLS_CC)) {
+ if (!phalcon_memnstr_str(id, SL("["))) {
if (!phalcon_array_isset_string(params, SS("id"))) {
phalcon_array_update_string(¶ms, SL("id"), &id, PH_COPY | PH_SEPARATE);
}
diff --git a/ext/text.c b/ext/text.c
index fc9fdacc341..7076d0cd599 100644
--- a/ext/text.c
+++ b/ext/text.c
@@ -75,12 +75,9 @@ PHP_METHOD(Phalcon_Text, camelize){
zval *str;
- PHALCON_MM_GROW();
-
phalcon_fetch_params(1, 1, 0, &str);
- phalcon_camelize(return_value, str TSRMLS_CC);
- RETURN_MM();
+ phalcon_camelize(return_value, str);
}
/**
@@ -97,12 +94,9 @@ PHP_METHOD(Phalcon_Text, uncamelize){
zval *str;
- PHALCON_MM_GROW();
-
phalcon_fetch_params(1, 1, 0, &str);
- phalcon_uncamelize(return_value, str TSRMLS_CC);
- RETURN_MM();
+ phalcon_uncamelize(return_value, str);
}
/**
@@ -137,7 +131,7 @@ PHP_METHOD(Phalcon_Text, increment){
}
PHALCON_INIT_VAR(parts);
- phalcon_fast_explode(parts, separator, str TSRMLS_CC);
+ phalcon_fast_explode(parts, separator, str);
if (phalcon_array_isset_long(parts, 1)) {
PHALCON_OBS_VAR(number);
phalcon_array_fetch_long(&number, parts, 1, PH_NOISY);
diff --git a/ext/translate/adapter/nativearray.c b/ext/translate/adapter/nativearray.c
index 3c7c6a9b263..e8b9d112b46 100644
--- a/ext/translate/adapter/nativearray.c
+++ b/ext/translate/adapter/nativearray.c
@@ -140,7 +140,7 @@ PHP_METHOD(Phalcon_Translate_Adapter_NativeArray, query){
PHALCON_CONCAT_SVS(key_placeholder, "%", key, "%");
PHALCON_INIT_NVAR(replaced);
- phalcon_fast_str_replace(replaced, key_placeholder, value, translation TSRMLS_CC);
+ phalcon_fast_str_replace(replaced, key_placeholder, value, translation);
PHALCON_CPY_WRT(translation, replaced);
zend_hash_move_forward_ex(ah0, &hp0);