/*
Copyright (C) 2001-2003, The Perl Foundation.
$Id: null.pmc 16275 2006-12-28 01:20:44Z particle $

=head1 NAME

src/pmc/null.pmc - NULL

=head1 DESCRIPTION

This simply creates a way of catching C<NULL> register accesses without
really slowing down the bytecode execution.

=head2 Methods

=over 4

=cut

*/

#include "parrot/parrot.h"

static void
show_backtrace(int ret, void *interp)
{
    PDB_backtrace( (Interp*)interp );
}

pmclass Null singleton {

/*

=item C<void init()>

Overrides the default to do nothing.

=cut

*/

    void init() {
    }

    void* get_pointer() {
        return PMCNULL;
    }

    void set_pointer(void* p) {
        PMCNULL = p;
    }

    INTVAL does(STRING* what) {
        /* XXX maybe a hack to get TGE running again */
        return 0;
    }

}

/*

=back

=cut

*/

/*
 * Local variables:
 *   c-file-style: "parrot"
 * End:
 * vim: expandtab shiftwidth=4:
 */
