2014-08-25 00:38:09 -04:00
|
|
|
#include "picrin.h"
|
|
|
|
|
|
|
|
struct pic_data *
|
|
|
|
pic_data_alloc(pic_state *pic, const pic_data_type *type, void *userdata)
|
|
|
|
{
|
|
|
|
struct pic_data *data;
|
|
|
|
|
2016-02-18 09:25:45 -05:00
|
|
|
data = (struct pic_data *)pic_obj_alloc(pic, sizeof(struct pic_data), PIC_TYPE_DATA);
|
2014-08-25 00:38:09 -04:00
|
|
|
data->type = type;
|
|
|
|
data->data = userdata;
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|