Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).

This commit is contained in:
Dmitry Stogov 2015-06-30 04:05:24 +03:00
parent 8cce5b2641
commit 4a2e40bb86
169 changed files with 3285 additions and 3175 deletions

View file

@ -255,8 +255,8 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
case PDO_PARAM_EVT_NORMALIZE:
/* decode name from $1, $2 into 0, 1 etc. */
if (param->name) {
if (param->name->val[0] == '$') {
ZEND_ATOL(param->paramno, param->name->val + 1);
if (ZSTR_VAL(param->name)[0] == '$') {
ZEND_ATOL(param->paramno, ZSTR_VAL(param->name) + 1);
} else {
/* resolve parameter name to rewritten name */
char *namevar;
@ -266,7 +266,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
ZEND_ATOL(param->paramno, namevar + 1);
param->paramno--;
} else {
pdo_raise_impl_error(stmt->dbh, stmt, "HY093", param->name->val);
pdo_raise_impl_error(stmt->dbh, stmt, "HY093", ZSTR_VAL(param->name));
return 0;
}
}