Changeset 22336 for v6

Show
Ignore:
Timestamp:
09/24/08 14:39:39 (2 months ago)
Author:
pmurias
Message:

[pugs] [smop] the haskell gc does the refcounting for the SMOPObjects passed around in haskell code

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • v6/smop/src/smop_haskell_ffi.c

    r22263 r22336  
    11#include <smop.h> 
    22#include <smop_s1p.h> 
     3#include <smop_lowlevel.h> 
    34SMOP__Object* smop_dispatch(SMOP__Object* interpreter,SMOP__Object* ri,SMOP__Object* identifier,SMOP__Object* capture) { 
    45  return SMOP_DISPATCH(interpreter,ri,identifier,capture); 
     
    67SMOP__Object* smop_release(SMOP__Object* interpreter,SMOP__Object* obj) { 
    78  return SMOP_RELEASE(interpreter,obj); 
     9} 
     10SMOP__Object* smop_release_with_global(SMOP__Object* obj) { 
     11//  printf("obj.refcount=%d\n",((SMOP_LOWLEVEL_INTERNAL*)obj->data)->ref_cnt); 
     12//  printf("interpreter.refcount=%d\n",((SMOP_LOWLEVEL_INTERNAL*)SMOP__GlobalInterpreter->data)->ref_cnt); 
     13  return SMOP_RELEASE(SMOP__GlobalInterpreter,obj); 
    814} 
    915SMOP__Object* smop_reference(SMOP__Object* interpreter,SMOP__Object* obj) {