Commit 670cc898 by Adeel

Code: Cleanup and formatting.

parent 1d597d5f
#include<iostream>
#include <nan.h>
#include "sass_context_wrapper.h"
......
......@@ -8,7 +8,8 @@ extern "C" {
if (ctx_w->dctx) {
compile_data(ctx_w->dctx);
} else if (ctx_w->fctx) {
}
else if (ctx_w->fctx) {
compile_file(ctx_w->fctx);
}
}
......@@ -23,7 +24,7 @@ extern "C" {
sass_context_wrapper* sass_make_context_wrapper() {
// (sass_context_wrapper*) calloc(1, sizeof(sass_context_wrapper));
auto ctx_w = (sass_context_wrapper*) calloc(1, sizeof(sass_context_wrapper));
auto ctx_w = (sass_context_wrapper*)calloc(1, sizeof(sass_context_wrapper));
ctx_w->importer_mutex = new std::mutex();
return ctx_w;
}
......@@ -31,7 +32,8 @@ extern "C" {
void sass_free_context_wrapper(sass_context_wrapper* ctx_w) {
if (ctx_w->dctx) {
sass_delete_data_context(ctx_w->dctx);
} else if (ctx_w->fctx) {
}
else if (ctx_w->fctx) {
sass_delete_file_context(ctx_w->fctx);
}
......
......@@ -6,13 +6,13 @@
extern "C" {
#endif
using namespace v8;
using namespace v8;
void compile_data(struct Sass_Data_Context* dctx);
void compile_file(struct Sass_File_Context* fctx);
void compile_it(uv_work_t* req);
void compile_data(struct Sass_Data_Context* dctx);
void compile_file(struct Sass_File_Context* fctx);
void compile_it(uv_work_t* req);
struct sass_context_wrapper {
struct sass_context_wrapper {
Sass_Data_Context* dctx;
Sass_File_Context* fctx;
Persistent<Object> stats;
......@@ -26,10 +26,10 @@ struct sass_context_wrapper {
NanCallback* success_callback;
NanCallback* error_callback;
NanCallback* importer_callback;
};
};
struct sass_context_wrapper* sass_make_context_wrapper(void);
void sass_free_context_wrapper(struct sass_context_wrapper* ctx_w);
struct sass_context_wrapper* sass_make_context_wrapper(void);
void sass_free_context_wrapper(struct sass_context_wrapper* ctx_w);
#ifdef __cplusplus
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment