Skip to content

Commit 8f1a7a8

Browse files
committed
Exports quote and unquote functions for C bindings
Needed to exchange strings with registered functions.
1 parent 9569ba1 commit 8f1a7a8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

sass_interface.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "sass_interface.h"
88
#include "context.hpp"
9+
#include "inspect.hpp"
910

1011
#ifndef SASS_ERROR_HANDLING
1112
#include "error_handling.hpp"
@@ -266,4 +267,12 @@ extern "C" {
266267
return 1;
267268
}
268269

270+
const char* quote (const char *str, const char quotemark) {
271+
return Sass::quote(str, quotemark).c_str();
272+
}
273+
274+
const char* unquote (const char *str) {
275+
return Sass::unquote(str).c_str();
276+
}
277+
269278
}

sass_interface.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ int sass_compile (struct sass_context* ctx);
8888
int sass_compile_file (struct sass_file_context* ctx);
8989
int sass_compile_folder (struct sass_folder_context* ctx);
9090

91+
const char* quote (const char *str, const char quotemark);
92+
const char* unquote (const char *str);
93+
9194
#ifdef __cplusplus
9295
}
9396
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy