type = ZEND_FFI_TYPE(ctype->type);
} else {
zend_wrong_parameter_class_error(1, "FFI\\CData or FFI\\CType", zv);
- return;
+ RETURN_THROWS();
}
RETURN_LONG(type->size);
type = ZEND_FFI_TYPE(ctype->type);
} else {
zend_wrong_parameter_class_error(1, "FFI\\CData or FFI\\CType", zv);
- return;
+ RETURN_THROWS();
}
RETURN_LONG(type->align);
/** @prefer-ref $ptr */
public static function addr(FFI\CData $ptr): FFI\CData {}
- /** @prefer-ref $ptr */
- public static function sizeof(object $ptr): ?int {}
+ /**
+ * @param FFI\CData|FFI\CType $ptr
+ * @prefer-ref $ptr
+ */
+ public static function sizeof($ptr): int {}
- /** @prefer-ref $ptr */
- public static function alignof(object $ptr): ?int {}
+ /**
+ * @param FFI\CData|FFI\CType $ptr
+ * @prefer-ref $ptr
+ */
+ public static function alignof($ptr): int {}
/**
* @param FFI\CData|string $from
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: abd3bc186ae3f71f2b7eb1d47f3b6bab84fb2bda */
+ * Stub hash: f106049da816d8fef7bbfb40c5335245b57044e0 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
ZEND_ARG_OBJ_INFO(ZEND_SEND_PREFER_REF, ptr, FFI\\CData, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_sizeof, 0, 1, IS_LONG, 1)
- ZEND_ARG_TYPE_INFO(ZEND_SEND_PREFER_REF, ptr, IS_OBJECT, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_FFI_sizeof, 0, 1, IS_LONG, 0)
+ ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, ptr)
ZEND_END_ARG_INFO()
#define arginfo_class_FFI_alignof arginfo_class_FFI_sizeof