From 1cdd171fbc5bad2e82075bc24e2f25375c7a1a47 Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Sat, 13 Aug 2016 12:39:16 +0100 Subject: [PATCH] Add PYBIND11_STR_TYPE to represent builtin `str` --- include/pybind11/common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/pybind11/common.h b/include/pybind11/common.h index a91598505..9db37adc8 100644 --- a/include/pybind11/common.h +++ b/include/pybind11/common.h @@ -95,6 +95,7 @@ #define PYBIND11_STRING_NAME "str" #define PYBIND11_SLICE_OBJECT PyObject #define PYBIND11_FROM_STRING PyUnicode_FromString +#define PYBIND11_STR_TYPE ::pybind11::str #define PYBIND11_OB_TYPE(ht_type) (ht_type).ob_base.ob_base.ob_type #define PYBIND11_PLUGIN_IMPL(name) \ extern "C" PYBIND11_EXPORT PyObject *PyInit_##name() @@ -113,6 +114,7 @@ #define PYBIND11_STRING_NAME "unicode" #define PYBIND11_SLICE_OBJECT PySliceObject #define PYBIND11_FROM_STRING PyString_FromString +#define PYBIND11_STR_TYPE ::pybind11::bytes #define PYBIND11_OB_TYPE(ht_type) (ht_type).ob_type #define PYBIND11_PLUGIN_IMPL(name) \ extern "C" PYBIND11_EXPORT PyObject *init##name()