Commit de2ac484 by Aaron Leung

Allowing the interface to ignore NULL pointers in the context object.

parent cc2c9ca7
...@@ -17,8 +17,8 @@ extern "C" char* sass_compile(sass_context* c_ctx) ...@@ -17,8 +17,8 @@ extern "C" char* sass_compile(sass_context* c_ctx)
// TO DO: CATCH ALL EXCEPTIONS // TO DO: CATCH ALL EXCEPTIONS
Context cpp_ctx; Context cpp_ctx;
cpp_ctx.sass_path = string(c_ctx->sass_path); cpp_ctx.sass_path = string(c_ctx->sass_path ? c_ctx->sass_path : "");
cpp_ctx.css_path = string(c_ctx->css_path); cpp_ctx.css_path = string(c_ctx->css_path ? c_ctx->css_path : "");
const size_t wd_len = 1024; const size_t wd_len = 1024;
char wd[wd_len]; char wd[wd_len];
......
...@@ -28,9 +28,9 @@ int main(int argc, char** argv) ...@@ -28,9 +28,9 @@ int main(int argc, char** argv)
} }
struct sass_context* ctx = sass_new_context(); struct sass_context* ctx = sass_new_context();
ctx->sass_path = ""; ctx->sass_path = NULL;
ctx->css_path = ""; ctx->css_path = NULL;
ctx->include_paths = ""; ctx->include_paths = NULL;
ctx->output_style = 0; ctx->output_style = 0;
ctx->input_file = argv[1]; ctx->input_file = argv[1];
ctx->input_string = NULL; ctx->input_string = NULL;
......
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