tinygi

view src/object.c @ 0:16fdca2a1ef5

initial tinygi commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 19 Jul 2015 18:30:29 +0300
parents
children bc64090fe3d1
line source
1 #include <stdlib.h>
2 #include <string.h>
3 #include "object.h"
4 #include "logger.h"
6 struct tgi_object *tgi_create_object(const char *name)
7 {
8 struct tgi_object *o;
10 if(!(o = malloc(sizeof *o))) {
11 tgi_log("failed to allocate memory\n");
12 return 0;
13 }
14 memset(o, 0, sizeof *o);
15 return o;
16 }