Add from_c() to get a Deno object from ptr.

This is a utility function for CodeCache and other handlers.
This commit is contained in:
Ryan Dahl 2018-07-26 17:47:42 -04:00
parent e7445507aa
commit 20a41aa9b5
5 changed files with 47 additions and 19 deletions

View file

@ -31,6 +31,9 @@ void deno_set_flags(int* argc, char** argv);
Deno* deno_new(void* data, deno_recv_cb cb);
void deno_delete(Deno* d);
// Returns the void* data provided in deno_new.
void* deno_get_data(Deno*);
// Returns false on error.
// Get error text with deno_last_exception().
// 0 = fail, 1 = success