Skip to content

Commit 7611978

Browse files
committed
pysass.cpp -> _sass.c
this is actually C source so it makes more sense with that extension
1 parent bdbc8fc commit 7611978

File tree

3 files changed

+4
-55
lines changed

3 files changed

+4
-55
lines changed

Makefile

Lines changed: 0 additions & 43 deletions
This file was deleted.

pysass.cpp renamed to _sass.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
#define COLLECTIONS_ABC_MOD "collections"
1212
#endif
1313

14-
#ifdef __cplusplus
15-
extern "C" {
16-
#endif
17-
1814
static PyObject* _to_py_value(const union Sass_Value* value);
1915
static union Sass_Value* _to_sass_value(PyObject* value);
2016

@@ -156,7 +152,7 @@ static union Sass_Value* _list_to_sass_value(PyObject* value) {
156152
PyObject* items = PyObject_GetAttrString(value, "items");
157153
PyObject* separator = PyObject_GetAttrString(value, "separator");
158154
PyObject* bracketed = PyObject_GetAttrString(value, "bracketed");
159-
Sass_Separator sep = SASS_COMMA;
155+
enum Sass_Separator sep = SASS_COMMA;
160156
if (separator == sass_comma) {
161157
sep = SASS_COMMA;
162158
} else if (separator == sass_space) {
@@ -519,7 +515,7 @@ PySass_compile_string(PyObject *self, PyObject *args) {
519515
struct Sass_Options *options;
520516
char *string, *include_paths, *source_map_file;
521517
const char *error_message, *output_string;
522-
Sass_Output_Style output_style;
518+
enum Sass_Output_Style output_style;
523519
int source_comments, error_status, precision, indented,
524520
source_map_embed, source_map_contents, source_map_file_urls,
525521
omit_source_map_url;
@@ -579,7 +575,7 @@ PySass_compile_filename(PyObject *self, PyObject *args) {
579575
struct Sass_Options *options;
580576
char *filename, *include_paths;
581577
const char *error_message, *output_string, *source_map_string;
582-
Sass_Output_Style output_style;
578+
enum Sass_Output_Style output_style;
583579
int source_comments, error_status, precision, source_map_embed,
584580
source_map_contents, source_map_file_urls, omit_source_map_url;
585581
PyObject *source_map_filename, *custom_functions, *custom_importers,
@@ -703,7 +699,3 @@ init_sass()
703699
}
704700

705701
#endif
706-
707-
#ifdef __cplusplus
708-
}
709-
#endif

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
LFLAGS_POSIX = ['-fPIC', '-lstdc++']
2323
LFLAGS_CLANG = ['-fPIC', '-stdlib=libc++']
2424

25-
sources = ['pysass.cpp']
25+
sources = ['_sass.c']
2626
headers = []
2727

2828
if sys.platform == 'win32':

0 commit comments

Comments
 (0)