summaryrefslogtreecommitdiff
path: root/test/new.cc
blob: 73184eaa8beac7ff4be8d545dbdefa719b09172d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdlib.h>

// Stub (incomplete) implementations to allow testing the library without an
// STL implementation
//
// Note: gcc complains on x86 if this takes a size_t, and on x86-64 if it takes
// an unsigned int.  This is just a stub, so it doesn't matter too much.
void *operator new(unsigned int s)
{
	return malloc(s);
}

void operator delete(void *o)
{
	free(o);
}