@@ -50,21 +50,23 @@ namespace Sass {
5050 this ->source = source;
5151 }
5252
53- inline bool sort_importers (const Sass_C_Importer_Call & i, const Sass_C_Importer_Call & j)
53+ inline bool sort_importers (const Sass_Importer_Entry & i, const Sass_Importer_Entry & j)
5454 { return sass_importer_get_priority (i) < sass_importer_get_priority (j); }
5555
5656 Context::Context (Context::Data initializers)
5757 : // Output(this),
5858 mem (Memory_Manager<AST_Node>()),
59+ c_options (initializers.c_options()),
60+ c_compiler (initializers.c_compiler()),
5961 source_c_str (initializers.source_c_str()),
6062 sources (vector<const char *>()),
6163 plugin_paths (initializers.plugin_paths()),
6264 include_paths (initializers.include_paths()),
6365 queue (vector<Sass_Queued>()),
6466 style_sheets (map<string, Block*>()),
6567 emitter (this ),
66- c_functions (vector<Sass_C_Function_Call >()),
67- c_importers (vector<Sass_C_Importer_Call >()),
68+ c_functions (vector<Sass_Function_Entry >()),
69+ c_importers (vector<Sass_Importer_Entry >()),
6870 indent (initializers.indent()),
6971 linefeed (initializers.linefeed()),
7072 input_path (make_canonical_path(initializers.input_path())),
@@ -123,11 +125,11 @@ namespace Sass {
123125
124126 }
125127
126- void Context::add_c_function (Sass_C_Function_Call function)
128+ void Context::add_c_function (Sass_Function_Entry function)
127129 {
128130 c_functions.push_back (function);
129131 }
130- void Context::add_c_importer (Sass_C_Importer_Call importer)
132+ void Context::add_c_importer (Sass_Importer_Entry importer)
131133 {
132134 c_importers.push_back (importer);
133135 // need to sort the array afterwards (no big deal)
@@ -279,8 +281,8 @@ namespace Sass {
279281 void register_function (Context&, Signature sig, Native_Function f, size_t arity, Env* env);
280282 void register_overload_stub (Context&, string name, Env* env);
281283 void register_built_in_functions (Context&, Env* env);
282- void register_c_functions (Context&, Env* env, Sass_C_Function_List );
283- void register_c_function (Context&, Env* env, Sass_C_Function_Call );
284+ void register_c_functions (Context&, Env* env, Sass_Function_List );
285+ void register_c_function (Context&, Env* env, Sass_Function_Entry );
284286
285287 char * Context::compile_block (Block* root)
286288 {
@@ -299,7 +301,7 @@ namespace Sass {
299301 {
300302 Block* root = 0 ;
301303 for (size_t i = 0 ; i < queue.size (); ++i) {
302- struct Sass_Import * import = sass_make_import (
304+ Sass_Import_Entry import = sass_make_import (
303305 queue[i].load_path .c_str (),
304306 queue[i].abs_path .c_str (),
305307 0 , 0
@@ -427,6 +429,7 @@ namespace Sass {
427429 name,
428430 0 ,
429431 0 ,
432+ &ctx,
430433 true );
431434 (*env)[name + " [f]" ] = stub;
432435 }
@@ -525,21 +528,16 @@ namespace Sass {
525528 register_function (ctx, unique_id_sig, unique_id, env);
526529 }
527530
528- void register_c_functions (Context& ctx, Env* env, Sass_C_Function_List descrs)
531+ void register_c_functions (Context& ctx, Env* env, Sass_Function_List descrs)
529532 {
530533 while (descrs && *descrs) {
531534 register_c_function (ctx, env, *descrs);
532535 ++descrs;
533536 }
534537 }
535- void register_c_function (Context& ctx, Env* env, Sass_C_Function_Call descr)
538+ void register_c_function (Context& ctx, Env* env, Sass_Function_Entry descr)
536539 {
537- Definition* def = make_c_function (
538- sass_function_get_signature (descr),
539- sass_function_get_function (descr),
540- sass_function_get_cookie (descr),
541- ctx
542- );
540+ Definition* def = make_c_function (descr, ctx);
543541 def->environment (env);
544542 (*env)[def->name () + " [f]" ] = def;
545543 }
0 commit comments