source: abuse/trunk/src/lisp/lisp_gc.h @ 481

Last change on this file since 481 was 481, checked in by Sam Hocevar, 11 years ago

Fuck the history, I'm renaming all .hpp files to .h for my own sanity.

  • Property svn:keywords set to Id
File size: 793 bytes
RevLine 
[56]1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *
5 *  This software was released into the Public Domain. As with most public
6 *  domain software, no warranty is made or implied by Crack dot Com or
7 *  Jonathan Clark.
8 */
9
[481]10#include "stack.h"
[2]11#ifndef __LISP_GC_HPP_
12#define __LISP_GC_HPP_
13
14extern grow_stack<void> l_user_stack;       // stack user progs can push data and have it GCed
15extern grow_stack<void *>l_ptr_stack;      // stack of user pointers, user pointers get remapped on GC
16
17void collect_space(int which_space); // should be tmp or permenant
18
19void register_pointer(void *&addr);
20void unregister_pointer(void *&addr);
21
22class p_ref {
23  public :
24  p_ref(void *&ref) { l_ptr_stack.push(&ref); }
25  ~p_ref() { l_ptr_stack.pop(1); }
26} ;
27
28
29#endif
Note: See TracBrowser for help on using the repository browser.