Lines Matching refs:w
40 void php_clear_warnings(MYSQLI_WARNING *w) in php_clear_warnings() argument
44 while (w) { in php_clear_warnings()
45 n = w; in php_clear_warnings()
46 zval_dtor(&(w->reason)); in php_clear_warnings()
47 zval_dtor(&(w->sqlstate)); in php_clear_warnings()
48 w = w->next; in php_clear_warnings()
60 MYSQLI_WARNING *w; in php_new_warning() local
62 w = (MYSQLI_WARNING *)ecalloc(1, sizeof(MYSQLI_WARNING)); in php_new_warning()
64 ZVAL_UTF8_STRING(&(w->reason), reason, ZSTR_DUPLICATE); in php_new_warning()
66 ZVAL_UTF8_STRINGL(&(w->sqlstate), "HY000", sizeof("HY000") - 1, ZSTR_DUPLICATE); in php_new_warning()
68 w->errorno = errorno; in php_new_warning()
70 return w; in php_new_warning()
78 MYSQLI_WARNING *w, *first = NULL, *prev = NULL; in php_get_warnings() local
89 w = php_new_warning(row[2], atoi(row[1]) TSRMLS_CC); in php_get_warnings()
91 first = w; in php_get_warnings()
94 prev->next = w; in php_get_warnings()
96 prev = w; in php_get_warnings()
107 MYSQLI_WARNING *w; in php_new_warning() local
109 w = (MYSQLI_WARNING *)ecalloc(1, sizeof(MYSQLI_WARNING)); in php_new_warning()
111 w->reason = *reason; in php_new_warning()
112 zval_copy_ctor(&(w->reason)); in php_new_warning()
114 ZVAL_UTF8_STRINGL(&(w->reason), Z_STRVAL(w->reason), Z_STRLEN(w->reason), ZSTR_AUTOFREE); in php_new_warning()
116 ZVAL_UTF8_STRINGL(&(w->sqlstate), "HY000", sizeof("HY000") - 1, ZSTR_DUPLICATE); in php_new_warning()
118 w->errorno = errorno; in php_new_warning()
120 return w; in php_new_warning()
128 MYSQLI_WARNING *w, *first = NULL, *prev = NULL; in php_get_warnings() local
161 w = php_new_warning(*entry, errno TSRMLS_CC); in php_get_warnings()
168 first = w; in php_get_warnings()
171 prev->next = (void *)w; in php_get_warnings()
173 prev = w; in php_get_warnings()
188 MYSQLI_WARNING *w; in PHP_METHOD() local
198 …MYSQLI_FETCH_RESOURCE(w, MYSQLI_WARNING *, &mysqli_warning, "mysqli_warning", MYSQLI_STATUS_VALID); in PHP_METHOD()
200 if (w && w->next) { in PHP_METHOD()
201 w = w->next; in PHP_METHOD()
202 ((MYSQLI_RESOURCE *)(obj->ptr))->ptr = w; in PHP_METHOD()
215 MYSQLI_WARNING *w; in mysqli_warning_message() local
221 w = (MYSQLI_WARNING *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; in mysqli_warning_message()
223 **retval = w->reason; in mysqli_warning_message()
234 MYSQLI_WARNING *w; in mysqli_warning_sqlstate() local
240 w = (MYSQLI_WARNING *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; in mysqli_warning_sqlstate()
242 **retval = w->sqlstate; in mysqli_warning_sqlstate()
253 MYSQLI_WARNING *w; in mysqli_warning_errno() local
258 w = (MYSQLI_WARNING *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; in mysqli_warning_errno()
260 ZVAL_LONG(*retval, w->errorno); in mysqli_warning_errno()
273 MYSQLI_WARNING *w; local
289 w = php_get_warnings(mysql->mysql TSRMLS_CC);
291 w = php_get_warnings(mysql->mysql->data TSRMLS_CC);
303 w = php_get_warnings(hdl TSRMLS_CC);
306 w = php_get_warnings(mysqli_stmt_get_connection(stmt->stmt) TSRMLS_CC);
318 mysqli_resource->ptr = mysqli_resource->info = (void *)w;