/*
Copyright (C) 2008, The Perl Foundation.
$Id: /mirror/trunk/languages/pipp/src/pmc/phpnull.pmc 34052 2008-12-17T13:41:30.698172Z Whiteknight  $

=head1 NAME

src/pmc/phpnull.pmc - PHP Null

=head1 DESCRIPTION

=head2 Methods

=over 4

=cut

*/

#include "php_private.h"

pmclass PhpNull
    extends  Undef
    dynpmc
    group    php_group
    hll      PHP {

/*

=item C<STRING* name()>

Return the string 'NULL'.

=cut

*/
    STRING* name() {
        return const_string(INTERP, "NULL");
    }

    VTABLE void set_integer_native(INTVAL value) {
    }

/*

=back

=head2 non-Vtable Methods

=over 4

=cut

=item C<STRING* serialize()>

Return a representation of this PMC in the same format as PHP's serialize function.

=cut

*/

    METHOD STRING* serialize() {
        STRING *serialized;
        serialized = CONST_STRING(INTERP, "N;");
        RETURN(STRING *serialized);
    }


/*

=back

=head2 Specific Methods

=over 4

=item C<PMC* to_number()>

=cut

*/
    METHOD PMC* to_number() {
        PMC     *retval = pmc_new(INTERP, dynpmc_PhpInteger);
        VTABLE_set_integer_native(INTERP, retval, 0);
        RETURN(PMC *retval);
    }

}

/*

=back

=head1 AUTHORS

Francois Perrad.

=cut

*/


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