From eeb756f1e4d0076c4c92d61ce386817ded5fdb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pontus=20=C3=96stlund?= <ponost@roxen.com> Date: Thu, 11 May 2017 18:06:20 +0200 Subject: [PATCH] No need to hold a reference to the importer since it's handled internally by libsass. --- sass.cmod | 8 +------- simple-test/02-syntax-error/input.scss | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/sass.cmod b/sass.cmod index c3a530cf27..dc4fb2c8c6 100644 --- a/sass.cmod +++ b/sass.cmod @@ -36,7 +36,6 @@ DECLARATIONS */ #define REGISTER_IMPORTER(CTX) \ - Sass_Importer_Entry c_imp = NULL; \ do { \ struct Sass_Options *s_opts = sass_context_get_options (CTX); \ Sass_Importer_Entry c_imp; \ @@ -46,7 +45,6 @@ DECLARATIONS sass_option_set_c_importers (s_opts, imp_list); \ } while (0) -#define UNREGISTER_IMPORTER() sass_delete_importer (c_imp) /*! @class Api *! @appears Tools.Sass.Compiler @@ -157,7 +155,7 @@ PIKECLASS Api // Libsass import callback. This will be called for every @import directive // in the Sass files. The callback __importer_cb will be called with // @path as argument and if @path is an URI __importer_cb will fetch - // it and return the data as a string. If it's not a string that's retured, + // it and return the data as a string. If it's not a string that's returned, // e.g. @path was not an URI, NULL is returned from here and libsass will // try to resolve @path. If it was an URI a Sass_Import_List will be // returned so that the contents of @path will replace the @import directive. @@ -237,8 +235,6 @@ PIKECLASS Api int err = sass_compile_file_context (ctx); - UNREGISTER_IMPORTER (); - // if (&THIS->thrown_err != NULL) { // sass_delete_file_context (ctx); // Pike_error ("%s", THIS->thrown_err.u.string->str); @@ -309,8 +305,6 @@ PIKECLASS Api sass_compile_data_context (ctx); - UNREGISTER_IMPORTER (); - // if (&THIS->thrown_err != NULL) { // sass_delete_data_context (ctx); // Pike_error ("%s", THIS->thrown_err.u.string->str); diff --git a/simple-test/02-syntax-error/input.scss b/simple-test/02-syntax-error/input.scss index ebb84d6a16..b023c43148 100644 --- a/simple-test/02-syntax-error/input.scss +++ b/simple-test/02-syntax-error/input.scss @@ -1,5 +1,3 @@ -@import 'http://pike.local:8282/test.scss'; - a { color: 23455 -- GitLab