Mercurial > repos > rhope
view runtime/blueprint.c @ 180:c40e0faa1c92
Add Call to Dict and List
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 19 Jun 2011 10:43:11 -0700 |
parents | 9fab36cc706b |
children |
line wrap: on
line source
#include "blueprint.h" #include "builtin.h" #include "context.h" #include <stddef.h> typedef struct { blueprint * bp; } l_Build; object * make_Blueprint(int32_t type_id) { t_Blueprint * obj; object * ret = new_object(TYPE_BLUEPRINT); obj = (t_Blueprint *)ret; obj->bp = type_id ? get_blueprint_byid(type_id) : NULL; return ret; } int32_t _internal_blueprint_eq(object * left, object * right) { t_Blueprint * l = (t_Blueprint *)left; t_Blueprint * r = (t_Blueprint *)right; release_ref(left); release_ref(right); return l->bp == r->bp; } int32_t _internal_blueprint_rawsize(object * bp) { int32_t ret; t_Blueprint * bprint = (t_Blueprint *)bp; ret = bprint->bp->size; release_ref(bp); return ret; }