1 /* go-unsafe-new.c -- unsafe.New function for Go.
3 Copyright 2009 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
11 #include "interface.h"
13 /* Implement unsafe_New, called from the reflect package. */
15 void *unsafe_New (const struct __go_type_descriptor
*)
16 __asm__ (GOSYM_PREFIX
"reflect.unsafe_New");
18 /* The dynamic type of the argument will be a pointer to a type
22 unsafe_New (const struct __go_type_descriptor
*descriptor
)
24 return runtime_cnew (descriptor
);