Lines Matching refs:buf
1384 char buf[MAX_TYPE_NAME_LEN]; member
1387 static int zend_ffi_ctype_name_prepend(zend_ffi_ctype_name_buf *buf, const char *str, size_t len) /… in zend_ffi_ctype_name_prepend() argument
1389 buf->start -= len; in zend_ffi_ctype_name_prepend()
1390 if (buf->start < buf->buf) { in zend_ffi_ctype_name_prepend()
1393 memcpy(buf->start, str, len); in zend_ffi_ctype_name_prepend()
1398 static int zend_ffi_ctype_name_append(zend_ffi_ctype_name_buf *buf, const char *str, size_t len) /*… in zend_ffi_ctype_name_append() argument
1400 if (buf->end + len > buf->buf + MAX_TYPE_NAME_LEN) { in zend_ffi_ctype_name_append()
1403 memcpy(buf->end, str, len); in zend_ffi_ctype_name_append()
1404 buf->end += len; in zend_ffi_ctype_name_append()
1409 static int zend_ffi_ctype_name(zend_ffi_ctype_name_buf *buf, const zend_ffi_type *type) /* {{{ */ in zend_ffi_ctype_name() argument
1456 …zend_ffi_ctype_name_prepend(buf, ZSTR_VAL(type->enumeration.tag_name), ZSTR_LEN(type->enumeration.… in zend_ffi_ctype_name()
1458 zend_ffi_ctype_name_prepend(buf, "<anonymous>", sizeof("<anonymous>")-1); in zend_ffi_ctype_name()
1469 if (!zend_ffi_ctype_name_prepend(buf, "*", 1)) { in zend_ffi_ctype_name()
1478 if (!zend_ffi_ctype_name_prepend(buf, "(", 1) in zend_ffi_ctype_name()
1479 || !zend_ffi_ctype_name_append(buf, ")", 1)) { in zend_ffi_ctype_name()
1483 if (!zend_ffi_ctype_name_append(buf, "(", 1) in zend_ffi_ctype_name()
1484 || !zend_ffi_ctype_name_append(buf, ")", 1)) { in zend_ffi_ctype_name()
1492 if (!zend_ffi_ctype_name_prepend(buf, "(", 1) in zend_ffi_ctype_name()
1493 || !zend_ffi_ctype_name_append(buf, ")", 1)) { in zend_ffi_ctype_name()
1497 if (!zend_ffi_ctype_name_append(buf, "[", 1)) { in zend_ffi_ctype_name()
1501 if (!zend_ffi_ctype_name_append(buf, "*", 1)) { in zend_ffi_ctype_name()
1508 if (!zend_ffi_ctype_name_append(buf, s, strlen(s))) { in zend_ffi_ctype_name()
1512 if (!zend_ffi_ctype_name_append(buf, "]", 1)) { in zend_ffi_ctype_name()
1520 …zend_ffi_ctype_name_prepend(buf, ZSTR_VAL(type->record.tag_name), ZSTR_LEN(type->record.tag_name)); in zend_ffi_ctype_name()
1522 zend_ffi_ctype_name_prepend(buf, "<anonymous>", sizeof("<anonymous>")-1); in zend_ffi_ctype_name()
1527 …zend_ffi_ctype_name_prepend(buf, ZSTR_VAL(type->record.tag_name), ZSTR_LEN(type->record.tag_name)); in zend_ffi_ctype_name()
1529 zend_ffi_ctype_name_prepend(buf, "<anonymous>", sizeof("<anonymous>")-1); in zend_ffi_ctype_name()
1547 return zend_ffi_ctype_name_prepend(buf, name, strlen(name)); in zend_ffi_ctype_name()
1581 buf1.start = buf1.end = buf1.buf + ((MAX_TYPE_NAME_LEN * 3) / 4); in zend_ffi_pass_incompatible()
1590 buf2.start = buf2.end = buf2.buf + ((MAX_TYPE_NAME_LEN * 3) / 4); in zend_ffi_pass_incompatible()
1608 buf1.start = buf1.end = buf1.buf + ((MAX_TYPE_NAME_LEN * 3) / 4); in zend_ffi_assign_incompatible()
1617 buf2.start = buf2.end = buf2.buf + ((MAX_TYPE_NAME_LEN * 3) / 4); in zend_ffi_assign_incompatible()
1633 zend_ffi_ctype_name_buf buf; in zend_ffi_get_class_name() local
1635 buf.start = buf.end = buf.buf + ((MAX_TYPE_NAME_LEN * 3) / 4); in zend_ffi_get_class_name()
1636 if (!zend_ffi_ctype_name(&buf, type)) { in zend_ffi_get_class_name()
1639 zend_string *name = zend_string_alloc(ZSTR_LEN(prefix) + 1 + buf.end - buf.start, 0); in zend_ffi_get_class_name()
1642 memcpy(ZSTR_VAL(name) + ZSTR_LEN(prefix) + 1, buf.start, buf.end - buf.start); in zend_ffi_get_class_name()
3134 struct stat buf; in zend_ffi_load() local
3146 if (stat(filename, &buf) != 0) { in zend_ffi_load()
3155 if ((buf.st_mode & S_IFMT) != S_IFREG) { in zend_ffi_load()
3164 code_size = buf.st_size; in zend_ffi_load()