lua-users home
lua-l archive

Re: [ANN] lua-sass

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Nice! But it leaks an sass_context if luaL_checkstring fails.
Consider changing
 int struct sass_context* ctx = sass_new_context();
 ...
 ctx->source_string = (char*)luaL_checkstring(L, 1);
to
 char* source = (char*)luaL_checkstring(L, 1);
 int struct sass_context* ctx = sass_new_context();
 ...
 ctx->source_string = source;
BTW, I hope sass_compile does not write to source_string. But if it doesn't,
why isn't it const?

AltStyle によって変換されたページ (->オリジナル) /