Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
670cc898
Commit
670cc898
authored
Nov 22, 2014
by
Adeel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code: Cleanup and formatting.
parent
1d597d5f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
binding.cpp
src/binding.cpp
+0
-1
sass_context_wrapper.cpp
src/sass_context_wrapper.cpp
+5
-3
sass_context_wrapper.h
src/sass_context_wrapper.h
+8
-8
No files found.
src/binding.cpp
View file @
670cc898
#include<iostream>
#include <nan.h>
#include <nan.h>
#include "sass_context_wrapper.h"
#include "sass_context_wrapper.h"
...
...
src/sass_context_wrapper.cpp
View file @
670cc898
...
@@ -8,7 +8,8 @@ extern "C" {
...
@@ -8,7 +8,8 @@ extern "C" {
if
(
ctx_w
->
dctx
)
{
if
(
ctx_w
->
dctx
)
{
compile_data
(
ctx_w
->
dctx
);
compile_data
(
ctx_w
->
dctx
);
}
else
if
(
ctx_w
->
fctx
)
{
}
else
if
(
ctx_w
->
fctx
)
{
compile_file
(
ctx_w
->
fctx
);
compile_file
(
ctx_w
->
fctx
);
}
}
}
}
...
@@ -23,7 +24,7 @@ extern "C" {
...
@@ -23,7 +24,7 @@ extern "C" {
sass_context_wrapper
*
sass_make_context_wrapper
()
{
sass_context_wrapper
*
sass_make_context_wrapper
()
{
// (sass_context_wrapper*) calloc(1, sizeof(sass_context_wrapper));
// (sass_context_wrapper*) calloc(1, sizeof(sass_context_wrapper));
auto
ctx_w
=
(
sass_context_wrapper
*
)
calloc
(
1
,
sizeof
(
sass_context_wrapper
));
auto
ctx_w
=
(
sass_context_wrapper
*
)
calloc
(
1
,
sizeof
(
sass_context_wrapper
));
ctx_w
->
importer_mutex
=
new
std
::
mutex
();
ctx_w
->
importer_mutex
=
new
std
::
mutex
();
return
ctx_w
;
return
ctx_w
;
}
}
...
@@ -31,7 +32,8 @@ extern "C" {
...
@@ -31,7 +32,8 @@ extern "C" {
void
sass_free_context_wrapper
(
sass_context_wrapper
*
ctx_w
)
{
void
sass_free_context_wrapper
(
sass_context_wrapper
*
ctx_w
)
{
if
(
ctx_w
->
dctx
)
{
if
(
ctx_w
->
dctx
)
{
sass_delete_data_context
(
ctx_w
->
dctx
);
sass_delete_data_context
(
ctx_w
->
dctx
);
}
else
if
(
ctx_w
->
fctx
)
{
}
else
if
(
ctx_w
->
fctx
)
{
sass_delete_file_context
(
ctx_w
->
fctx
);
sass_delete_file_context
(
ctx_w
->
fctx
);
}
}
...
...
src/sass_context_wrapper.h
View file @
670cc898
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
using
namespace
v8
;
using
namespace
v8
;
void
compile_data
(
struct
Sass_Data_Context
*
dctx
);
void
compile_data
(
struct
Sass_Data_Context
*
dctx
);
void
compile_file
(
struct
Sass_File_Context
*
fctx
);
void
compile_file
(
struct
Sass_File_Context
*
fctx
);
void
compile_it
(
uv_work_t
*
req
);
void
compile_it
(
uv_work_t
*
req
);
struct
sass_context_wrapper
{
struct
sass_context_wrapper
{
Sass_Data_Context
*
dctx
;
Sass_Data_Context
*
dctx
;
Sass_File_Context
*
fctx
;
Sass_File_Context
*
fctx
;
Persistent
<
Object
>
stats
;
Persistent
<
Object
>
stats
;
...
@@ -26,10 +26,10 @@ struct sass_context_wrapper {
...
@@ -26,10 +26,10 @@ struct sass_context_wrapper {
NanCallback
*
success_callback
;
NanCallback
*
success_callback
;
NanCallback
*
error_callback
;
NanCallback
*
error_callback
;
NanCallback
*
importer_callback
;
NanCallback
*
importer_callback
;
};
};
struct
sass_context_wrapper
*
sass_make_context_wrapper
(
void
);
struct
sass_context_wrapper
*
sass_make_context_wrapper
(
void
);
void
sass_free_context_wrapper
(
struct
sass_context_wrapper
*
ctx_w
);
void
sass_free_context_wrapper
(
struct
sass_context_wrapper
*
ctx_w
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment