source: abuse/trunk/src/lisp/lisp_gc.hpp @ 91

Last change on this file since 91 was 62, checked in by Sam Hocevar, 12 years ago
  • Moved some LISP stuff into src/lisp and removed unused lisp_mac.cpp file.
File size: 795 bytes
Line 
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
10#include "stack.hpp"
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.