Title: Py3 std::string is not converted to 'bytes' · Issue #85 · boostorg/python · GitHub
Open Graph Title: Py3 std::string is not converted to 'bytes' · Issue #85 · boostorg/python
X Title: Py3 std::string is not converted to 'bytes' · Issue #85 · boostorg/python
Description: In Python 3, std::string is incorrectly converted to python 'str' type. It should be converted to 'bytes' type. Pull request #54 probably solves this issue. Code of str_test module: #include
Open Graph Description: In Python 3, std::string is incorrectly converted to python 'str' type. It should be converted to 'bytes' type. Pull request #54 probably solves this issue. Code of str_test module: #include X Description: In Python 3, std::string is incorrectly converted to python 'str' type. It should be converted to 'bytes' type. Pull request #54 probably solves this issue. Code of str_test module:...
Opengraph URL: https://github.com/boostorg/python/issues/85
X: @github
Domain: patch-diff.githubusercontent.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Py3 std::string is not converted to 'bytes'","articleBody":"In Python 3, _std::string_ is incorrectly converted to python 'str' type. It should be converted to 'bytes' type. Pull request #54 probably solves this issue. \n\nCode of str_test module:\n\n```\n#include \u003cboost/python.hpp\u003e\n\nstd::string getString()\n{\n return \"string\";\n}\n\nstd::wstring getWString()\n{\n return L\"wstring\";\n}\n\nBOOST_PYTHON_MODULE( str_test )\n{\n boost::python::def( \"getString\", \u0026getString );\n boost::python::def( \"getWString\", \u0026getWString );\n}\n```\n\nFirst example is Python 2 and shows correct results.\n\n```\nPython 2.7.9 (default, Mar 1 2015, 12:57:24) \n[GCC 4.9.2] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e from str_test import getString, getWString\n\u003e\u003e\u003e type(getString())\n\u003ctype 'str'\u003e\n\u003e\u003e\u003e type(getWString())\n\u003ctype 'unicode'\u003e\n```\n\nSecond example is Python 3 and shows that std::string is unexpectedly converted to 'str'.\n\n```\nPython 3.4.2 (default, Oct 8 2014, 10:45:20) \n[GCC 4.9.1] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e from str_test import getString, getWString\n\u003e\u003e\u003e type(getString())\n\u003cclass 'str'\u003e # ooops!!! expected bytes there!\n\u003e\u003e\u003e type(getWString())\n\u003cclass 'str'\u003e\n```\n","author":{"url":"https://github.com/pavelschon","@type":"Person","name":"pavelschon"},"datePublished":"2016-08-26T21:45:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/85/python/issues/85"}
route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:9f99091f-ce10-f990-fdca-afd2f15ad1cb current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id DFF8:4BEBD:345181C:4789BEF:6972C4F0 html-safe-nonce a4028464245464ba811e70b46efeae77654b71c28057ef44f09247c612bd395a visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkY4OjRCRUJEOjM0NTE4MUM6NDc4OUJFRjo2OTcyQzRGMCIsInZpc2l0b3JfaWQiOiIyMzY0NjA1NTIwODcxMDgxMjAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= visitor-hmac af9567c841e44edc55b80590f6e1e93342aa32d2ddf17eb1e05df1f6240c9692 hovercard-subject-tag issue:173549766 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/boostorg/python/85/issue_layout twitter:image https://opengraph.githubassets.com/3fbd3d699672e22cb53df483f741a8457e59b1471e4a725dcc54a7bc28019c95/boostorg/python/issues/85 twitter:card summary_large_image og:image https://opengraph.githubassets.com/3fbd3d699672e22cb53df483f741a8457e59b1471e4a725dcc54a7bc28019c95/boostorg/python/issues/85 og:image:alt In Python 3, std::string is incorrectly converted to python 'str' type. It should be converted to 'bytes' type. Pull request #54 probably solves this issue. Code of str_test module: #include og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username pavelschon hostname github.com expected-hostname github.com None aa656e37a6f46b81c2416d9c983f7c54e264ee31be17c0e6c9414b9f9f9c6eb4 turbo-cache-control no-preview go-import github.com/boostorg/python git https://github.com/boostorg/python.git octolytics-dimension-user_id 3170529 octolytics-dimension-user_login boostorg octolytics-dimension-repository_id 7589968 octolytics-dimension-repository_nwo boostorg/python octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 7589968 octolytics-dimension-repository_network_root_nwo boostorg/python turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release add6bd61de5b348d2978a698a5796a7d0438e7be ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.