Skip to content

Instantly share code, notes, and snippets.

@saper
Created October 30, 2019 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saper/48ff78d712a17d8936635dd6636ffcde to your computer and use it in GitHub Desktop.
Save saper/48ff78d712a17d8936635dd6636ffcde to your computer and use it in GitHub Desktop.
diff --git a/include/sass/version.h b/include/sass/version.h
index 56ea016a..198bbca3 100644
--- a/include/sass/version.h
+++ b/include/sass/version.h
@@ -2,7 +2,7 @@
#define SASS_VERSION_H
#ifndef LIBSASS_VERSION
-#define LIBSASS_VERSION "[NA]"
+#define LIBSASS_VERSION "3.6.2"
#endif
#ifndef LIBSASS_LANGUAGE_VERSION
diff --git a/src/error_handling.cpp b/src/error_handling.cpp
index 7aa5df31..f8ea84e0 100644
--- a/src/error_handling.cpp
+++ b/src/error_handling.cpp
@@ -20,7 +20,10 @@ namespace Sass {
InvalidSass::InvalidSass(ParserState pstate, Backtraces traces, std::string msg, char* owned_src)
: Base(pstate, msg, traces), owned_src(owned_src)
- { }
+ {
+ fprintf(stderr, "InvalidSass instantiated, pstate is %p owned_src is %p\n",
+ (void *)(&pstate), owned_src);
+ }
InvalidParent::InvalidParent(Selector* parent, Backtraces traces, Selector* selector)
diff --git a/src/error_handling.hpp b/src/error_handling.hpp
index d5157d6d..9eeda01d 100644
--- a/src/error_handling.hpp
+++ b/src/error_handling.hpp
@@ -43,17 +43,27 @@ namespace Sass {
public:
InvalidSass(InvalidSass& other) : Base(other), owned_src(other.owned_src) {
// Assumes that `this` will outlive `other`.
+ fprintf(stderr, "InvalidSass cloned from %p, owned_src was %p\n",
+ (void *)(&other),
+ other.owned_src);
other.owned_src = nullptr;
}
// Required because the copy constructor's argument is not const.
// Can't use `std::move` here because we build on Visual Studio 2013.
InvalidSass(InvalidSass &&other) : Base(other), owned_src(other.owned_src) {
+ fprintf(stderr, "InvalidSass cloned from %p, owned_src was %p\n",
+ (void *)(&other),
+ other.owned_src);
other.owned_src = nullptr;
}
InvalidSass(ParserState pstate, Backtraces traces, std::string msg, char* owned_src = nullptr);
- virtual ~InvalidSass() throw() { sass_free_memory(owned_src); };
+ virtual ~InvalidSass() throw() {
+ fprintf(stderr, "InvalidSass destroyed, owned_src was %p\n",
+ owned_src);
+ sass_free_memory(owned_src);
+ };
char *owned_src;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment