Skip to content

More libsass 3.2 prep (changes in beta3, beta4) #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 5, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
libsass 3.2.0-beta.4
  • Loading branch information
asottile committed Apr 4, 2015
commit 76058a40d899c002cc5d142986128e3032fac898
10 changes: 6 additions & 4 deletions pysass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions sasstests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,10 +1017,10 @@ def test_raises(self):

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'
Expand All @@ -1030,9 +1030,9 @@ def test_warning(self):

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'
Expand All @@ -1042,7 +1042,7 @@ def test_error(self):

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'
Expand All @@ -1056,7 +1056,7 @@ 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'
Expand Down
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