src/util/obstackpp.hpp File Reference

#include <obstack.h>

Go to the source code of this file.

Functions

void * operator new (size_t bytes, struct obstack &obst)
void * operator new[] (size_t bytes, struct obstack &obst)
static void * obstack_chunk_alloc (size_t size)
static void obstack_chunk_free (void *data)


Function Documentation

static void* obstack_chunk_alloc ( size_t  size  )  [inline, static]

Definition at line 34 of file obstackpp.hpp.

00035 {
00036   return new char[size];
00037 }

static void obstack_chunk_free ( void *  data  )  [inline, static]

Definition at line 39 of file obstackpp.hpp.

00040 {
00041   char* ptr = static_cast<char*> (data);
00042   delete[] ptr;
00043 }

void* operator new ( size_t  bytes,
struct obstack &  obst 
) [inline]

Definition at line 23 of file obstackpp.hpp.

00024 {
00025   return obstack_alloc(&obst, bytes);
00026 }

void* operator new[] ( size_t  bytes,
struct obstack &  obst 
) [inline]

Definition at line 29 of file obstackpp.hpp.

00030 {
00031   return obstack_alloc(&obst, bytes);
00032 }


Generated on Mon Jun 9 03:38:27 2014 for SuperTux by  doxygen 1.5.1