File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,11 @@ namespace Sass {
59
59
// load one specific plugin
60
60
bool Plugins::load_plugin (const std::string& path)
61
61
{
62
-
62
+ # ifdef ENABLE_LOAD_PLUGINS
63
63
typedef const char * (*__plugin_version__)(void );
64
64
typedef Sass_Function_List (*__plugin_load_fns__)(void );
65
65
typedef Sass_Importer_List (*__plugin_load_imps__)(void );
66
66
67
- #ifndef _WASM
68
67
if (LOAD_LIB (plugin, path))
69
68
{
70
69
// try to load initial function to query libsass version suppor
@@ -111,7 +110,7 @@ namespace Sass {
111
110
if (const char * dlopen_error = dlerror ()) std::cerr << dlopen_error << std::endl;
112
111
}
113
112
#else
114
- std::cerr << " loading plugin unsupported <" << path << " >" << std::endl;
113
+ std::cerr << " plugins loading is unsupported <" << path << " >" << std::endl;
115
114
#endif
116
115
117
116
return false ;
Original file line number Diff line number Diff line change 6
6
#include " utf8_string.hpp"
7
7
#include " sass/functions.h"
8
8
9
+ #ifdef ENABLE_LOAD_PLUGINS
9
10
#ifdef _WIN32
10
11
11
12
#define LOAD_LIB (var, path ) HMODULE var = LoadLibraryW(UTF_8::convert_to_utf16(path).c_str())
24
25
#define CLOSE_LIB (var ) dlclose(var)
25
26
26
27
#endif
28
+ #endif
27
29
28
30
namespace Sass {
29
31
Original file line number Diff line number Diff line change 38
38
# endif
39
39
#endif
40
40
41
+ // enable loading of plugins for non-wasm
42
+ #ifndef _WASM
43
+ # define ENABLE_LOAD_PLUGINS
44
+ #endif
45
+
41
46
// path separation char
42
47
#ifndef PATH_SEP
43
48
# ifdef _WIN32
You can’t perform that action at this time.
0 commit comments