Mercurial > repos > rhope
view runtime/bool.c @ 43:709df3e82bb4
Added methods to support type inference
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 15 Oct 2009 21:32:43 -0400 |
parents | 31f8182f3433 |
children | a24eb366195c d2f9b0a9403d |
line wrap: on
line source
#include "bool.h" #include "func.h" #include "builtin.h" #include "context.h" #include <stddef.h> t_Boolean * val_yes; t_Boolean * val_no; #define lval ((t_Boolean *)(cdata->params[0]))->val MethodNoLocals(If,Boolean, NumParams 1, CallSpace 1) Param(0, TYPE_BOOLEAN) if(lval) { Ret(1, NULL) } else { Ret(1, cdata->params[0]); Ret(0, NULL) } EndFunc