Skip to content

Commit e8fb5cc

Browse files
authored
Merge pull request #16 from sproberts92/master
Add compatability with Windows `yajl.dll`
2 parents 6917b7d + 89ef9a4 commit e8fb5cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

yajl/yajl_common.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ def load_yajl():
3232
:returns: The yajl shared object
3333
:raises OSError: when libyajl cannot be loaded
3434
'''
35-
for ftype in '', '.so', '.dylib':
36-
yajlso = 'libyajl%s' %(ftype)
35+
fnames = ['libyajl%s' %(t) for t in ['', '.so', '.dylib']] + ['yajl.dll']
36+
37+
for yajlso in fnames:
3738
try:
3839
return cdll.LoadLibrary(yajlso)
3940
except OSError:
4041
pass
42+
4143
raise OSError('Yajl shared object cannot be found. '
4244
'Please install Yajl and confirm it is on your shared lib path.')
4345

0 commit comments

Comments
 (0)