mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
22 lines
618 B
C++
22 lines
618 B
C++
/*
|
|
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; });
|
|
|
|
// #150: char bindings broken
|
|
m2.def("print_char", [](char c) { std::cout << c << std::endl; });
|
|
}
|