mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix #287
This commit is contained in:
parent
048f31109f
commit
69a28d50f6
2 changed files with 28 additions and 0 deletions
|
@ -912,6 +912,8 @@ private:
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Implementation
|
* Implementation
|
||||||
*/
|
*/
|
||||||
|
@ -4435,6 +4437,8 @@ inline bool SSLClient::check_host_name(const char *pattern,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
} // namespace httplib
|
} // namespace httplib
|
||||||
|
|
||||||
#endif // CPPHTTPLIB_HTTPLIB_H
|
#endif // CPPHTTPLIB_HTTPLIB_H
|
||||||
|
|
24
split.py
Normal file
24
split.py
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
import os
|
||||||
|
|
||||||
|
border = '// ----------------------------------------------------------------------------'
|
||||||
|
|
||||||
|
with open('httplib.h') as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
inImplementation = False
|
||||||
|
os.makedirs('out', exist_ok=True)
|
||||||
|
with open('out/httplib.h', 'w') as fh:
|
||||||
|
with open('out/httplib.cc', 'w') as fc:
|
||||||
|
fc.write('#include "httplib.h"\n')
|
||||||
|
fc.write('namespace httplib {\n')
|
||||||
|
for line in lines:
|
||||||
|
isBorderLine = border in line
|
||||||
|
if isBorderLine:
|
||||||
|
inImplementation = not inImplementation
|
||||||
|
else:
|
||||||
|
if inImplementation:
|
||||||
|
fc.write(line.replace('inline ', ''))
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
fh.write(line)
|
||||||
|
pass
|
||||||
|
fc.write('} // namespace httplib\n')
|
Loading…
Reference in a new issue