Sha256: bc6bab832742bf1ad96e0e88e6954ff8e66df11238753168218c7f96ac85cf02

Contents?: true

Size: 1.11 KB

Versions: 6

Compression:

Stored size: 1.11 KB

Contents

#include <stdio.h>
#include <string.h>
#include "source.hpp"
#include "utf8/checked.h"
#include "position.hpp"

namespace Sass {

  SourceData::SourceData()
    : SharedObj()
  {
  }

  SourceFile::SourceFile(
    const char* path,
    const char* data,
    size_t srcid) :
    SourceData(),
    path(sass_copy_c_string(path)),
    data(sass_copy_c_string(data)),
    length(0),
    srcid(srcid)
  {
    length = strlen(data);
  }

  SourceFile::~SourceFile() {
    sass_free_memory(path);
    sass_free_memory(data);
  }

  const char* SourceFile::end() const
  {
    return data + length;
  }

  const char* SourceFile::begin() const
  {
    return data;
  }

  const char* SourceFile::getRawData() const
  {
    return data;
  }

  SourceSpan SourceFile::getSourceSpan()
  {
    return SourceSpan(this);
  }

  ItplFile::ItplFile(const char* data, const SourceSpan& pstate) :
    SourceFile(pstate.getPath(),
      data, pstate.getSrcId()),
    pstate(pstate)
  {}

  const char* ItplFile::getRawData() const
  {
    return pstate.getRawData();
  }

  SourceSpan ItplFile::getSourceSpan()
  {
    return SourceSpan(pstate);
  }

}

Version data entries

6 entries across 5 versions & 4 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/sassc-2.4.0/ext/libsass/src/source.cpp
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/sassc-2.4.0/ext/libsass/src/source.cpp
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/sassc-2.4.0/ext/libsass/src/source.cpp
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext/libsass/src/source.cpp
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext/libsass/src/source.cpp
sassc-2.4.0 ext/libsass/src/source.cpp