File: assert.h

package info (click to toggle)
muon-meson 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 15,112 kB
  • sloc: ansic: 61,516; python: 4,429; cpp: 1,968; javascript: 586; sh: 443; asm: 178; xml: 67; objc: 36; makefile: 21; modula3: 8; f90: 7
file content (16 lines) | stat: -rw-r--r-- 430 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * SPDX-FileCopyrightText: Stone Tickle <lattis@mochiro.moe>
 * SPDX-License-Identifier: GPL-3.0-only
 */

#ifndef MUON_ASSERT_H
#define MUON_ASSERT_H

#ifdef _WIN32
#include <stdint.h>
#define assert(x) ((void)((x) || (win_assert_fail(#x, __FILE__, __LINE__, __func__), 0)))
__declspec(noreturn) void win_assert_fail(const char *msg, const char *file, uint32_t line, const char *func);
#else
#include <assert.h>
#endif
#endif