Author: Antonio Cuni <anto.c...@gmail.com> Branch: Changeset: r44868:1ad80d433b50 Date: 2011-06-09 13:38 +0200 http://bitbucket.org/pypy/pypy/changeset/1ad80d433b50/
Log: merge heads diff --git a/pypy/translator/c/gc.py b/pypy/translator/c/gc.py --- a/pypy/translator/c/gc.py +++ b/pypy/translator/c/gc.py @@ -297,6 +297,13 @@ gc_startup_code = RefcountingGcPolicy.gc_startup_code.im_func + def compilation_info(self): + eci = BasicGcPolicy.compilation_info(self) + eci = eci.merge(ExternalCompilationInfo( + post_include_bits=['#define USING_NO_GC_AT_ALL'], + )) + return eci + class FrameworkGcPolicy(BasicGcPolicy): transformerclass = framework.FrameworkGCTransformer diff --git a/pypy/translator/c/src/mem.h b/pypy/translator/c/src/mem.h --- a/pypy/translator/c/src/mem.h +++ b/pypy/translator/c/src/mem.h @@ -222,6 +222,15 @@ #endif /* USING_BOEHM_GC */ + +#ifdef USING_NO_GC_AT_ALL +#define OP_BOEHM_ZERO_MALLOC(size, r, restype, is_atomic, is_varsize) \ + r = (restype) calloc(1, size); +#define OP_BOEHM_DISAPPEARING_LINK(link, obj, r) /* nothing */ +#define OP_GC__DISABLE_FINALIZERS(r) /* nothing */ +#define OP_GC__ENABLE_FINALIZERS(r) /* nothing */ +#endif + /************************************************************/ /* weakref support */ _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit