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
fa595ff8
Commit
fa595ff8
authored
Nov 18, 2014
by
Adeel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code: Renames callback <-> success_callback.
parent
3a9c84bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
binding.cpp
src/binding.cpp
+3
-3
sass_context_wrapper.cpp
src/sass_context_wrapper.cpp
+1
-1
sass_context_wrapper.h
src/sass_context_wrapper.h
+1
-1
No files found.
src/binding.cpp
View file @
fa595ff8
...
@@ -74,7 +74,7 @@ void ExtractOptions(Local<Object> options, void* cptr, sass_context_wrapper* ctx
...
@@ -74,7 +74,7 @@ void ExtractOptions(Local<Object> options, void* cptr, sass_context_wrapper* ctx
NanAssignPersistent
(
ctx_w
->
stats
,
options
->
Get
(
NanNew
(
"stats"
))
->
ToObject
());
NanAssignPersistent
(
ctx_w
->
stats
,
options
->
Get
(
NanNew
(
"stats"
))
->
ToObject
());
// async (callback) style
// async (callback) style
Local
<
Function
>
callback
=
Local
<
Function
>::
Cast
(
options
->
Get
(
NanNew
(
"success"
)));
Local
<
Function
>
success_
callback
=
Local
<
Function
>::
Cast
(
options
->
Get
(
NanNew
(
"success"
)));
Local
<
Function
>
error_callback
=
Local
<
Function
>::
Cast
(
options
->
Get
(
NanNew
(
"error"
)));
Local
<
Function
>
error_callback
=
Local
<
Function
>::
Cast
(
options
->
Get
(
NanNew
(
"error"
)));
Local
<
Function
>
importer_callback
=
Local
<
Function
>::
Cast
(
options
->
Get
(
NanNew
(
"importer"
)));
Local
<
Function
>
importer_callback
=
Local
<
Function
>::
Cast
(
options
->
Get
(
NanNew
(
"importer"
)));
...
@@ -84,7 +84,7 @@ void ExtractOptions(Local<Object> options, void* cptr, sass_context_wrapper* ctx
...
@@ -84,7 +84,7 @@ void ExtractOptions(Local<Object> options, void* cptr, sass_context_wrapper* ctx
ctx_w
->
dctx
=
(
struct
Sass_Data_Context
*
)
cptr
;
ctx_w
->
dctx
=
(
struct
Sass_Data_Context
*
)
cptr
;
}
}
ctx_w
->
request
.
data
=
ctx_w
;
ctx_w
->
request
.
data
=
ctx_w
;
ctx_w
->
callback
=
new
NanCallback
(
callback
);
ctx_w
->
success_callback
=
new
NanCallback
(
success_
callback
);
ctx_w
->
error_callback
=
new
NanCallback
(
error_callback
);
ctx_w
->
error_callback
=
new
NanCallback
(
error_callback
);
ctx_w
->
importer_callback
=
new
NanCallback
(
importer_callback
);
ctx_w
->
importer_callback
=
new
NanCallback
(
importer_callback
);
...
@@ -157,7 +157,7 @@ void MakeCallback(uv_work_t* req) {
...
@@ -157,7 +157,7 @@ void MakeCallback(uv_work_t* req) {
NanNew
<
String
>
(
val
),
NanNew
<
String
>
(
val
),
NanNew
(
ctx_w
->
stats
)
->
Get
(
NanNew
(
"sourceMap"
))
NanNew
(
ctx_w
->
stats
)
->
Get
(
NanNew
(
"sourceMap"
))
};
};
ctx_w
->
callback
->
Call
(
2
,
argv
);
ctx_w
->
success_
callback
->
Call
(
2
,
argv
);
}
else
{
}
else
{
// if error, do callback(error)
// if error, do callback(error)
const
char
*
err
=
sass_context_get_error_json
(
ctx
);
const
char
*
err
=
sass_context_get_error_json
(
ctx
);
...
...
src/sass_context_wrapper.cpp
View file @
fa595ff8
...
@@ -33,7 +33,7 @@ extern "C" {
...
@@ -33,7 +33,7 @@ extern "C" {
}
}
NanDisposePersistent
(
ctx_w
->
stats
);
NanDisposePersistent
(
ctx_w
->
stats
);
delete
ctx_w
->
callback
;
delete
ctx_w
->
success_
callback
;
delete
ctx_w
->
error_callback
;
delete
ctx_w
->
error_callback
;
delete
ctx_w
->
importer_callback
;
delete
ctx_w
->
importer_callback
;
...
...
src/sass_context_wrapper.h
View file @
fa595ff8
...
@@ -16,7 +16,7 @@ struct sass_context_wrapper {
...
@@ -16,7 +16,7 @@ struct sass_context_wrapper {
Sass_File_Context
*
fctx
;
Sass_File_Context
*
fctx
;
Persistent
<
Object
>
stats
;
Persistent
<
Object
>
stats
;
uv_work_t
request
;
uv_work_t
request
;
NanCallback
*
callback
;
NanCallback
*
success_
callback
;
NanCallback
*
error_callback
;
NanCallback
*
error_callback
;
NanCallback
*
importer_callback
;
NanCallback
*
importer_callback
;
};
};
...
...
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