forked from cory/tildefriends
Create a util.js.{h,c} from some common things.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3681 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "file.js.h"
|
||||
|
||||
#include "task.h"
|
||||
#include "util.js.h"
|
||||
|
||||
#include <malloc.h>
|
||||
#include <stdbool.h>
|
||||
@ -177,7 +178,7 @@ static JSValue _file_write_file(JSContext* context, JSValueConst this_val, int a
|
||||
const char* file_name = JS_ToCString(context, argv[0]);
|
||||
|
||||
size_t size;
|
||||
uint8_t* buffer = tf_try_get_array_buffer(context, &size, argv[1]);
|
||||
uint8_t* buffer = tf_util_try_get_array_buffer(context, &size, argv[1]);
|
||||
bool is_array_buffer = false;
|
||||
if (buffer)
|
||||
{
|
||||
|
Reference in New Issue
Block a user