+void *psi_do_calloc(let_calloc *alloc)
+{
+ decl_type *type = real_decl_type(alloc->type);
+ size_t size;
+
+ if (type->type == PSI_T_STRUCT) {
+ /* psi_do_clean expects a NULL pointer after the struct */
+ size = decl_struct_size(type->strct) + sizeof(void *);
+ } else {
+ size = psi_t_size(type->type);
+ }
+
+ return ecalloc(alloc->n, size);
+}
+