File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -815,6 +815,10 @@ extern "C" {
815
815
Sass_Import_Entry ADDCALL sass_compiler_get_last_import (struct Sass_Compiler * compiler) { return compiler->cpp_ctx ->import_stack .back (); }
816
816
Sass_Import_Entry ADDCALL sass_compiler_get_import_entry (struct Sass_Compiler * compiler, size_t idx) { return compiler->cpp_ctx ->import_stack [idx]; }
817
817
818
+ // Calculate the size of the stored null terminated array
819
+ size_t ADDCALL sass_context_get_included_files_size (struct Sass_Context * ctx)
820
+ { size_t l = 0 ; auto i = ctx->included_files ; while (i && *i) { ++i; ++l; } return l; }
821
+
818
822
// Create getter and setters for options
819
823
IMPLEMENT_SASS_OPTION_ACCESSOR (int , precision);
820
824
IMPLEMENT_SASS_OPTION_ACCESSOR (enum Sass_Output_Style, output_style);
Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ ADDAPI size_t ADDCALL sass_context_get_error_column (struct Sass_Context* ctx);
119
119
ADDAPI const char * ADDCALL sass_context_get_source_map_string (struct Sass_Context * ctx );
120
120
ADDAPI char * * ADDCALL sass_context_get_included_files (struct Sass_Context * ctx );
121
121
122
+ // Calculate the size of the stored null terminated array
123
+ ADDAPI size_t ADDCALL sass_context_get_included_files_size (struct Sass_Context * ctx );
124
+
122
125
// Take ownership of memory (value on context is set to 0)
123
126
ADDAPI char * ADDCALL sass_context_take_error_json (struct Sass_Context * ctx );
124
127
ADDAPI char * ADDCALL sass_context_take_error_text (struct Sass_Context * ctx );
You can’t perform that action at this time.
0 commit comments