fix severe regression involving character arrays (fixes #137)

This commit is contained in:
Wenzel Jakob
2016-03-10 13:24:10 +01:00
parent cf8b30287b
commit 17cdb06c1b
6 changed files with 33 additions and 8 deletions

18
example/issues.cpp Normal file
View File

@@ -0,0 +1,18 @@
/*
example/issues.cpp -- collection of testcases for miscellaneous issues
Copyright (c) 2015 Wenzel Jakob <wenzel@inf.ethz.ch>
All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
*/
#include "example.h"
void init_issues(py::module &m) {
py::module m2 = m.def_submodule("issues");
// #137: const char* isn't handled properly
m2.def("print_cchar", [](const char *string) { std::cout << string << std::endl; });
}