2 Copyright (C) 2008, The Perl Foundation.
7 pmc/phpboolean.pmc - PHP Boolean
19 #include "php_private.h"
33 =item C<STRING* name()>
35 Return the string 'boolean'.
41 return const_string(INTERP, "boolean");
46 =item C<STRING* get_string()>
48 Return the string '1' or ''.
53 STRING* get_string() {
54 if (PMC_int_val(SELF))
55 return const_string(INTERP, "1");
57 return const_string(INTERP, "");
65 =head2 non-Vtable Methods
77 =head2 Specific Methods
81 =item C<PMC* to_number()>
86 METHOD PMC* to_number() {
87 PMC *retval = pmc_new(INTERP, dynpmc_PhpInteger);
88 INTVAL val = SELF.get_integer();
89 VTABLE_set_integer_native(INTERP, retval, val);
110 * c-file-style: "parrot"
112 * vim: expandtab shiftwidth=4: