Sha256: b55d2f91968a7477ffcce987ea90af4147500c0cdd0d2dee97d5256533ea11d3

Contents?: true

Size: 810 Bytes

Versions: 1

Compression:

Stored size: 810 Bytes

Contents

#include <cstdlib>
#include <cstring>
#include <vector>
#include <sstream>

#include "sass.h"
#include "util.hpp"

extern "C" {
  using namespace std;

  // caller must free the returned memory
  char* ADDCALL sass_string_quote (const char *str, const char quote_mark) {
    string quoted = Sass::quote(str, quote_mark);
    char *cstr = (char*) malloc(quoted.length() + 1);
    std::strcpy(cstr, quoted.c_str());
    return cstr;
  }

  // caller must free the returned memory
  char* ADDCALL sass_string_unquote (const char *str) {
    string unquoted = Sass::unquote(str);
    char *cstr = (char*) malloc(unquoted.length() + 1);
    std::strcpy(cstr, unquoted.c_str());
    return cstr;
  }

  // Get compiled libsass version
  const char* ADDCALL libsass_version(void) {
    return LIBSASS_VERSION;
  }

}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sassc-0.0.10 ext/libsass/sass.cpp