Skip to content

Commit 46ee11c

Browse files
committed
Bring back external functions
1 parent de0391f commit 46ee11c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/context.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,13 @@ namespace Sass {
987987

988988
void register_c_function2(Context& ctx, Sass_Function_Entry descr)
989989
{
990-
/* ExternalCallable* def = */ make_c_function2(descr, ctx);
990+
ExternalCallable* callable = make_c_function2(descr, ctx);
991+
992+
ctx.functions.insert(std::make_pair(callable->name(), callable));
993+
ctx.varRoot.hoistFunction(callable->name());
994+
ctx.fnCache.push_back(callable);
995+
996+
// IdxRef fidx = ctx.varRoot.createFunction(def->name());
991997
// def->environment(env);
992998
// env->setFunction(def->name(), def);
993999
}

0 commit comments

Comments
 (0)