diff --git a/libsass b/libsass index 62314f6a..b87f4c7a 160000 --- a/libsass +++ b/libsass @@ -1 +1 @@ -Subproject commit 62314f6a3cbc7dbed3878884504847edd7fecb7b +Subproject commit b87f4c7a14fd03852bda7238c305269d3340447e diff --git a/pysass.cpp b/pysass.cpp index d58b579b..1bfed69a 100644 --- a/pysass.cpp +++ b/pysass.cpp @@ -362,10 +362,12 @@ static union Sass_Value* _to_sass_value(PyObject* value) { } static union Sass_Value* _call_py_f( - const union Sass_Value* sass_args, void* cookie + const union Sass_Value* sass_args, + Sass_Function_Entry cb, + struct Sass_Options* opts ) { size_t i; - PyObject* pyfunc = (PyObject*)cookie; + PyObject* pyfunc = (PyObject*)sass_function_get_cookie(cb); PyObject* py_args = PyTuple_New(sass_list_get_length(sass_args)); PyObject* py_result = NULL; union Sass_Value* sass_result = NULL; @@ -394,13 +396,13 @@ static void _add_custom_functions( struct Sass_Options* options, PyObject* custom_functions ) { Py_ssize_t i; - Sass_C_Function_List fn_list = sass_make_function_list( + Sass_Function_List fn_list = sass_make_function_list( PyList_Size(custom_functions) ); for (i = 0; i < PyList_GET_SIZE(custom_functions); i += 1) { PyObject* sass_function = PyList_GET_ITEM(custom_functions, i); PyObject* signature = PySass_Object_Bytes(sass_function); - Sass_C_Function_Callback fn = sass_make_function( + Sass_Function_Entry fn = sass_make_function( PySass_Bytes_AS_STRING(signature), _call_py_f, sass_function diff --git a/sasstests.py b/sasstests.py index aed141bc..15991952 100644 --- a/sasstests.py +++ b/sasstests.py @@ -1009,34 +1009,40 @@ def test_raises(self): r' Backtrace:\n' r' \tstdin:0, in function `raises`\n' r' \tstdin:0\n' - r' on line 1 of stdin\n$' + r' on line 1 of stdin\n' + r'>> a { content: raises\(\); }\n' + r' -------------\^\n$' )): compile_with_func('a { content: raises(); }') def test_warning(self): with assert_raises_compile_error( - 'Error: warning in C function returns-warning: ' + 'Error: warning in C function returns_warning: ' 'This is a warning\n' ' Backtrace:\n' - ' \tstdin:0, in function `returns-warning`\n' + ' \tstdin:0, in function `returns_warning`\n' ' \tstdin:0\n' ' on line 1 of stdin\n' + '>> a { content: returns_warning(); }\n' + ' -------------^\n' ): compile_with_func('a { content: returns_warning(); }') def test_error(self): with assert_raises_compile_error( - 'Error: error in C function returns-error: This is an error\n' + 'Error: error in C function returns_error: This is an error\n' ' Backtrace:\n' - ' \tstdin:0, in function `returns-error`\n' + ' \tstdin:0, in function `returns_error`\n' ' \tstdin:0\n' ' on line 1 of stdin\n' + '>> a { content: returns_error(); }\n' + ' -------------^\n' ): compile_with_func('a { content: returns_error(); }') def test_returns_unknown_object(self): with assert_raises_compile_error( - 'Error: error in C function returns-unknown: ' + 'Error: error in C function returns_unknown: ' 'Unexpected type: `tuple`.\n' ' Expected one of:\n' ' - None\n' @@ -1050,9 +1056,11 @@ def test_returns_unknown_object(self): ' - SassWarning\n' ' - SassError\n\n' ' Backtrace:\n' - ' \tstdin:0, in function `returns-unknown`\n' + ' \tstdin:0, in function `returns_unknown`\n' ' \tstdin:0\n' ' on line 1 of stdin\n' + '>> a { content: returns_unknown(); }\n' + ' -------------^\n' ): compile_with_func('a { content: returns_unknown(); }') pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy