Skip to content

Commit 91b649b

Browse files
committed
Updated WIN_RELEASE target to download the versioned package.
Fixed a few issues when running the unit tests on my osx and windows installs. Bumped version number for new release.
1 parent 983fb3f commit 91b649b

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

clang/cindex.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,9 @@ def get_returned_pointer_level(self, curr=0):
11221122
children = self.get_children()
11231123
if len(children) == 1 and children[0].kind == CursorKind.TYPE_REF:
11241124
ref = children[0].get_reference()
1125-
return ret + ref.get_returned_pointer_level()
1125+
if ref != self:
1126+
return ret + ref.get_returned_pointer_level()
1127+
return ret
11261128

11271129
if self.kind == CursorKind.TYPEDEF_DECL:
11281130
for child in children:

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"description": "C/C++/ObjC/ObjC++ autocompletions and code navigation",
77
"author": "Fredrik Ehnbom (quarnster)",
88
"homepage": "http://github.com/quarnster/SublimeClang",
9-
"last_modified": "2012-11-07 10:10:00",
9+
"last_modified": "2012-11-21 13:50:00",
1010
"platforms": {
1111
"*": [
1212
{
13-
"version": "1.0.38",
14-
"url": "http://cloud.github.com/downloads/quarnster/SublimeClang/SublimeClang-1.0.38.sublime-package"
13+
"version": "1.0.39",
14+
"url": "http://cloud.github.com/downloads/quarnster/SublimeClang/SublimeClang-1.0.39.sublime-package"
1515
}
1616
]
1717
}

src/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,17 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
241241
endif()
242242
243243
if(DEFINED WIN_RELEASE)
244-
if(NOT EXISTS ./SublimeClang.sublime-package)
244+
file(DOWNLOAD https://raw.github.com/quarnster/SublimeClang/master/package.json ${PROJECT_BINARY_DIR}/current.json LOG log)
245+
file(READ "${PROJECT_BINARY_DIR}/current.json" TEMP)
246+
string(REGEX MATCH "\"url\": \"(.*/(.*))\"" TEMP ${TEMP})
247+
248+
if(NOT EXISTS ${PROJECT_BINARY_DIR}/${CMAKE_MATCH_2})
245249
message("Downloading current SublimeClang release...")
246-
file(DOWNLOAD http://cloud.github.com/downloads/quarnster/SublimeClang/SublimeClang.sublime-package ./SublimeClang.sublime-package)
250+
file(DOWNLOAD ${CMAKE_MATCH_1} ${PROJECT_BINARY_DIR}/${CMAKE_MATCH_2})
247251
endif()
248252
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/source
249253
COMMAND ${CMAKE_COMMAND} -E make_directory source
250-
COMMAND ${CMAKE_COMMAND} -E chdir source ${CMAKE_COMMAND} -E tar xf ../SublimeClang.sublime-package
254+
COMMAND ${CMAKE_COMMAND} -E chdir source ${CMAKE_COMMAND} -E tar xf ${PROJECT_BINARY_DIR}/${CMAKE_MATCH_2}
251255
COMMAND ${CMAKE_COMMAND} -E copy_if_different source/libclang.dll ${PROJECT_SOURCE_DIR}/../libclang.dll
252256
COMMAND ${CMAKE_COMMAND} -E copy_if_different source/libclang_x64.dll ${PROJECT_SOURCE_DIR}/../libclang_x64.dll
253257
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}

sublimeclang.sublime-project

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"-DSUBLIMECLANG_VERSION=\"1.0\"",
4848
"-DSUBLIMECLANG_USE_TR1",
4949
"-isystem", "/",
50-
"-isystem", "/usr/lib/c++/v1",
5150
"-Wall"
5251
]
5352
}

unittests/gold.txt.gz

82.6 KB
Binary file not shown.

unittests/unittest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ def read_file(filename):
236236
f.close()
237237
return data
238238

239-
opts.extend(json.loads(read_file("sublimeclang.sublime-project"))["settings"]["sublimeclang_options"])
239+
if platform.system() != "Windows":
240+
opts.extend(json.loads(read_file("sublimeclang.sublime-project"))["settings"]["sublimeclang_options"])
240241

241242
if goto_def:
242243
tu = get_tu("src/main.cpp")

0 commit comments

Comments
 (0)