Add a way to look up objects

This commit is contained in:
Carlos Martín Nieto
2013-01-30 00:16:52 +01:00
parent ad567fbf41
commit d71c6ff702
7 changed files with 118 additions and 0 deletions

17
c_src/object.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef GEEF_OBJECT_H
#define GEEF_OBJECT_H
#include "erl_nif.h"
#include <git2.h>
extern ErlNifResourceType *geef_object_type;
typedef struct {
git_object *obj;
} geef_object;
ERL_NIF_TERM geef_object_lookup(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]);
void geef_object_free(ErlNifEnv *env, void *cd);
#endif