annotate libgo/runtime/go-assert.h @ 136:4627f235cf2a

fix c-next example
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 08 Nov 2018 14:11:56 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* go-assert.h -- libgo specific assertions
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 Copyright 2010 The Go Authors. All rights reserved.
kono
parents:
diff changeset
4 Use of this source code is governed by a BSD-style
kono
parents:
diff changeset
5 license that can be found in the LICENSE file. */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 #ifndef LIBGO_GO_ASSERT_H
kono
parents:
diff changeset
8 #define LIBGO_GO_ASSERT_H
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 /* We use a Go specific assert function so that functions which call
kono
parents:
diff changeset
11 assert aren't required to always split the stack. */
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 extern void __go_assert_fail (const char *file, unsigned int lineno)
kono
parents:
diff changeset
14 __attribute__ ((noreturn));
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 #define __go_assert(e) ((e) ? (void) 0 : __go_assert_fail (__FILE__, __LINE__))
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 #endif /* !defined(LIBGO_GO_ASSERT_H) */