|
1 |
| -// Copyright (c) 2013 David Caldwell. |
2 |
| -// Copyright (c) 2014 Marcel Greter. |
| 1 | +// Copyright (c) 2013-2014 David Caldwell. |
| 2 | +// Copyright (c) 2014-2017 Marcel Greter. |
3 | 3 | //
|
4 | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 | 5 | // of this software and associated documentation files (the "Software"), to deal
|
@@ -587,42 +587,44 @@ union Sass_Value* call_sass_function(const union Sass_Value* s_args, Sass_Functi
|
587 | 587 | SV* init_sass_options(struct Sass_Options* sass_options, HV* perl_options)
|
588 | 588 | {
|
589 | 589 |
|
590 |
| - SV** input_path_sv = hv_fetchs(perl_options, "input_path", false); |
591 |
| - SV** output_path_sv = hv_fetchs(perl_options, "output_path", false); |
592 |
| - SV** output_style_sv = hv_fetchs(perl_options, "output_style", false); |
593 |
| - SV** source_comments_sv = hv_fetchs(perl_options, "source_comments", false); |
594 |
| - SV** omit_source_map_sv = hv_fetchs(perl_options, "omit_source_map", false); |
595 |
| - SV** omit_source_map_url_sv = hv_fetchs(perl_options, "omit_source_map_url", false); |
596 |
| - SV** source_map_contents_sv = hv_fetchs(perl_options, "source_map_contents", false); |
597 |
| - SV** source_map_embed_sv = hv_fetchs(perl_options, "source_map_embed", false); |
598 |
| - SV** include_paths_sv = hv_fetchs(perl_options, "include_paths", false); |
599 |
| - SV** plugin_paths_sv = hv_fetchs(perl_options, "plugin_paths", false); |
600 |
| - SV** precision_sv = hv_fetchs(perl_options, "precision", false); |
601 |
| - SV** linefeed_sv = hv_fetchs(perl_options, "linefeed", false); |
602 |
| - SV** indent_sv = hv_fetchs(perl_options, "indent", false); |
603 |
| - SV** source_map_root_sv = hv_fetchs(perl_options, "source_map_root", false); |
604 |
| - SV** source_map_file_sv = hv_fetchs(perl_options, "source_map_file", false); |
605 |
| - SV** sass_headers_sv = hv_fetchs(perl_options, "headers", false); |
606 |
| - SV** sass_importers_sv = hv_fetchs(perl_options, "importers", false); |
607 |
| - SV** sass_functions_sv = hv_fetchs(perl_options, "functions", false); |
608 |
| - |
609 |
| - if (input_path_sv) sass_option_set_input_path (sass_options, safe_svpv(*input_path_sv, "")); |
610 |
| - if (output_path_sv) sass_option_set_output_path (sass_options, safe_svpv(*output_path_sv, "")); |
611 |
| - if (output_style_sv) sass_option_set_output_style (sass_options, SvUV(*output_style_sv)); |
612 |
| - if (source_comments_sv) sass_option_set_source_comments (sass_options, SvTRUE(*source_comments_sv)); |
613 |
| - if (omit_source_map_sv) sass_option_set_omit_source_map_url (sass_options, SvTRUE(*omit_source_map_sv)); |
614 |
| - if (omit_source_map_url_sv) sass_option_set_omit_source_map_url (sass_options, SvTRUE(*omit_source_map_url_sv)); |
615 |
| - if (source_map_contents_sv) sass_option_set_source_map_contents (sass_options, SvTRUE(*source_map_contents_sv)); |
616 |
| - if (source_map_embed_sv) sass_option_set_source_map_embed (sass_options, SvTRUE(*source_map_embed_sv)); |
617 |
| - if (include_paths_sv) sass_option_set_include_path (sass_options, safe_svpv(*include_paths_sv, "")); |
618 |
| - if (plugin_paths_sv) sass_option_set_plugin_path (sass_options, safe_svpv(*plugin_paths_sv, "")); |
619 |
| - if (source_map_root_sv) sass_option_set_source_map_root (sass_options, safe_svpv(*source_map_root_sv, "")); |
620 |
| - if (source_map_file_sv) sass_option_set_source_map_file (sass_options, safe_svpv(*source_map_file_sv, "")); |
| 590 | + SV** input_path_sv = hv_fetchs(perl_options, "input_path", false); |
| 591 | + SV** output_path_sv = hv_fetchs(perl_options, "output_path", false); |
| 592 | + SV** output_style_sv = hv_fetchs(perl_options, "output_style", false); |
| 593 | + SV** source_comments_sv = hv_fetchs(perl_options, "source_comments", false); |
| 594 | + SV** omit_source_map_sv = hv_fetchs(perl_options, "omit_source_map", false); |
| 595 | + SV** omit_source_map_url_sv = hv_fetchs(perl_options, "omit_source_map_url", false); |
| 596 | + SV** source_map_file_urls_sv = hv_fetchs(perl_options, "source_map_file_urls", false); |
| 597 | + SV** source_map_contents_sv = hv_fetchs(perl_options, "source_map_contents", false); |
| 598 | + SV** source_map_embed_sv = hv_fetchs(perl_options, "source_map_embed", false); |
| 599 | + SV** include_paths_sv = hv_fetchs(perl_options, "include_paths", false); |
| 600 | + SV** plugin_paths_sv = hv_fetchs(perl_options, "plugin_paths", false); |
| 601 | + SV** precision_sv = hv_fetchs(perl_options, "precision", false); |
| 602 | + SV** linefeed_sv = hv_fetchs(perl_options, "linefeed", false); |
| 603 | + SV** indent_sv = hv_fetchs(perl_options, "indent", false); |
| 604 | + SV** source_map_root_sv = hv_fetchs(perl_options, "source_map_root", false); |
| 605 | + SV** source_map_file_sv = hv_fetchs(perl_options, "source_map_file", false); |
| 606 | + SV** sass_headers_sv = hv_fetchs(perl_options, "headers", false); |
| 607 | + SV** sass_importers_sv = hv_fetchs(perl_options, "importers", false); |
| 608 | + SV** sass_functions_sv = hv_fetchs(perl_options, "functions", false); |
| 609 | + |
| 610 | + if (input_path_sv) sass_option_set_input_path (sass_options, safe_svpv(*input_path_sv, "")); |
| 611 | + if (output_path_sv) sass_option_set_output_path (sass_options, safe_svpv(*output_path_sv, "")); |
| 612 | + if (output_style_sv) sass_option_set_output_style (sass_options, SvUV(*output_style_sv)); |
| 613 | + if (source_comments_sv) sass_option_set_source_comments (sass_options, SvTRUE(*source_comments_sv)); |
| 614 | + if (omit_source_map_sv) sass_option_set_omit_source_map_url (sass_options, SvTRUE(*omit_source_map_sv)); |
| 615 | + if (omit_source_map_url_sv) sass_option_set_omit_source_map_url (sass_options, SvTRUE(*omit_source_map_url_sv)); |
| 616 | + if (source_map_file_urls_sv) sass_option_set_source_map_file_urls (sass_options, SvTRUE(*source_map_file_urls_sv)); |
| 617 | + if (source_map_contents_sv) sass_option_set_source_map_contents (sass_options, SvTRUE(*source_map_contents_sv)); |
| 618 | + if (source_map_embed_sv) sass_option_set_source_map_embed (sass_options, SvTRUE(*source_map_embed_sv)); |
| 619 | + if (include_paths_sv) sass_option_set_include_path (sass_options, safe_svpv(*include_paths_sv, "")); |
| 620 | + if (plugin_paths_sv) sass_option_set_plugin_path (sass_options, safe_svpv(*plugin_paths_sv, "")); |
| 621 | + if (source_map_root_sv) sass_option_set_source_map_root (sass_options, safe_svpv(*source_map_root_sv, "")); |
| 622 | + if (source_map_file_sv) sass_option_set_source_map_file (sass_options, safe_svpv(*source_map_file_sv, "")); |
621 | 623 |
|
622 | 624 | // do not set anything if the option is set to undef
|
623 |
| - if (isSafeSv(indent_sv)) sass_option_set_indent (sass_options, SvPV_nolen(*indent_sv)); |
624 |
| - if (isSafeSv(linefeed_sv)) sass_option_set_linefeed (sass_options, SvPV_nolen(*linefeed_sv)); |
625 |
| - if (isSafeSv(precision_sv)) sass_option_set_precision (sass_options, SvUV(*precision_sv)); |
| 625 | + if (isSafeSv(indent_sv)) sass_option_set_indent (sass_options, SvPV_nolen(*indent_sv)); |
| 626 | + if (isSafeSv(linefeed_sv)) sass_option_set_linefeed (sass_options, SvPV_nolen(*linefeed_sv)); |
| 627 | + if (isSafeSv(precision_sv)) sass_option_set_precision (sass_options, SvUV(*precision_sv)); |
626 | 628 |
|
627 | 629 | if (sass_importers_sv) {
|
628 | 630 | int i;
|
|
0 commit comments