potion  0.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
primitive.c File Reference

methods for the immediate primitive types PN_NIL, PNBoolean, PNAny More...

#include <stdio.h>
#include <stdlib.h>
#include "potion.h"
#include "internal.h"
+ Include dependency graph for primitive.c:

Go to the source code of this file.

Functions

static PN potion_nil_is_nil (Potion *P, PN closure, PN self)
 memberof PN_NIL "nil?" method (non-p2) More...
 
static PN potion_any_is_nil (Potion *P, PN closure, PN self)
 
static PN potion_nil_cmp (Potion *P, PN cl, PN self, PN value)
 memberof NilKind "cmp" method. More...
 
static PN potion_bool_cmp (Potion *P, PN cl, PN self, PN value)
 fw to num More...
 
void potion_primitive_init (Potion *P)
 

Detailed Description

methods for the immediate primitive types PN_NIL, PNBoolean, PNAny

Definition in file primitive.c.

Function Documentation

static PN potion_nil_is_nil ( Potion P,
PN  closure,
PN  self 
)
static

memberof PN_NIL "nil?" method (non-p2)

Returns
PN_TRUE for PN_NIL, PN_TRUE for PNAny

Definition at line 14 of file primitive.c.

static PN potion_any_is_nil ( Potion P,
PN  closure,
PN  self 
)
static

Definition at line 18 of file primitive.c.

static PN potion_nil_cmp ( Potion P,
PN  cl,
PN  self,
PN  value 
)
static

memberof NilKind "cmp" method.

nil is 0 or "" or FALSE as cmp context otherwise it is always less.

Definition at line 33 of file primitive.c.

static PN potion_bool_cmp ( Potion P,
PN  cl,
PN  self,
PN  value 
)
static

fw to num

Definition at line 49 of file primitive.c.

void potion_primitive_init ( Potion P)

Definition at line 77 of file primitive.c.