Skip to content

Commit 76058a4

Browse files
committed
libsass 3.2.0-beta.4
1 parent 506f09e commit 76058a4

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

pysass.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,12 @@ static union Sass_Value* _to_sass_value(PyObject* value) {
362362
}
363363

364364
static union Sass_Value* _call_py_f(
365-
const union Sass_Value* sass_args, void* cookie
365+
const union Sass_Value* sass_args,
366+
Sass_Function_Entry cb,
367+
struct Sass_Options* opts
366368
) {
367369
size_t i;
368-
PyObject* pyfunc = (PyObject*)cookie;
370+
PyObject* pyfunc = (PyObject*)sass_function_get_cookie(cb);
369371
PyObject* py_args = PyTuple_New(sass_list_get_length(sass_args));
370372
PyObject* py_result = NULL;
371373
union Sass_Value* sass_result = NULL;
@@ -394,13 +396,13 @@ static void _add_custom_functions(
394396
struct Sass_Options* options, PyObject* custom_functions
395397
) {
396398
Py_ssize_t i;
397-
Sass_C_Function_List fn_list = sass_make_function_list(
399+
Sass_Function_List fn_list = sass_make_function_list(
398400
PyList_Size(custom_functions)
399401
);
400402
for (i = 0; i < PyList_GET_SIZE(custom_functions); i += 1) {
401403
PyObject* sass_function = PyList_GET_ITEM(custom_functions, i);
402404
PyObject* signature = PySass_Object_Bytes(sass_function);
403-
Sass_C_Function_Callback fn = sass_make_function(
405+
Sass_Function_Entry fn = sass_make_function(
404406
PySass_Bytes_AS_STRING(signature),
405407
_call_py_f,
406408
sass_function

sasstests.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,10 +1017,10 @@ def test_raises(self):
10171017

10181018
def test_warning(self):
10191019
with assert_raises_compile_error(
1020-
'Error: warning in C function returns-warning: '
1020+
'Error: warning in C function returns_warning: '
10211021
'This is a warning\n'
10221022
' Backtrace:\n'
1023-
' \tstdin:0, in function `returns-warning`\n'
1023+
' \tstdin:0, in function `returns_warning`\n'
10241024
' \tstdin:0\n'
10251025
' on line 1 of stdin\n'
10261026
'>> a { content: returns_warning(); }\n'
@@ -1030,9 +1030,9 @@ def test_warning(self):
10301030

10311031
def test_error(self):
10321032
with assert_raises_compile_error(
1033-
'Error: error in C function returns-error: This is an error\n'
1033+
'Error: error in C function returns_error: This is an error\n'
10341034
' Backtrace:\n'
1035-
' \tstdin:0, in function `returns-error`\n'
1035+
' \tstdin:0, in function `returns_error`\n'
10361036
' \tstdin:0\n'
10371037
' on line 1 of stdin\n'
10381038
'>> a { content: returns_error(); }\n'
@@ -1042,7 +1042,7 @@ def test_error(self):
10421042

10431043
def test_returns_unknown_object(self):
10441044
with assert_raises_compile_error(
1045-
'Error: error in C function returns-unknown: '
1045+
'Error: error in C function returns_unknown: '
10461046
'Unexpected type: `tuple`.\n'
10471047
' Expected one of:\n'
10481048
' - None\n'
@@ -1056,7 +1056,7 @@ def test_returns_unknown_object(self):
10561056
' - SassWarning\n'
10571057
' - SassError\n\n'
10581058
' Backtrace:\n'
1059-
' \tstdin:0, in function `returns-unknown`\n'
1059+
' \tstdin:0, in function `returns_unknown`\n'
10601060
' \tstdin:0\n'
10611061
' on line 1 of stdin\n'
10621062
'>> a { content: returns_unknown(); }\n'

0 commit comments

Comments
 (0)