mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-13 06:28:52 +03:00

Notably, the glue layer side of the changed multiple interface inheritance layout (DMD a54e89d) has not been implemented yet. This corresponds to DMD commit 3f6a763c0589dd03c1c206eafd434b593702564e.
39 lines
1,007 B
C
39 lines
1,007 B
C
// Compiler implementation of the D programming language
|
|
// Copyright (c) 2000-2015 by Digital Mars
|
|
// All Rights Reserved
|
|
// written by Walter Bright
|
|
// http://www.digitalmars.com
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
// http://www.boost.org/LICENSE_1_0.txt
|
|
// https://github.com/D-Programming-Language/dmd/blob/master/src/root/rmem.h
|
|
|
|
#ifndef ROOT_MEM_H
|
|
#define ROOT_MEM_H
|
|
|
|
#include <stddef.h> // for size_t
|
|
|
|
#if __APPLE__ && __i386__
|
|
/* size_t is 'unsigned long', which makes it mangle differently
|
|
* than D's 'uint'
|
|
*/
|
|
typedef unsigned d_size_t;
|
|
#else
|
|
typedef size_t d_size_t;
|
|
#endif
|
|
|
|
struct Mem
|
|
{
|
|
Mem() { }
|
|
|
|
static char *xstrdup(const char *s);
|
|
static void *xmalloc(d_size_t size);
|
|
static void *xcalloc(d_size_t size, d_size_t n);
|
|
static void *xrealloc(void *p, d_size_t size);
|
|
static void xfree(void *p);
|
|
static void *xmallocdup(void *o, d_size_t size);
|
|
static void error();
|
|
};
|
|
|
|
extern Mem mem;
|
|
|
|
#endif /* ROOT_MEM_H */
|