<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>C on Pierre Gradot</title>
		<link>https://gradot.dev/blog/tags/c/</link>
		<description>Recent content in C on Pierre Gradot</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Wed, 17 Jun 2020 16:40:29 +0200</lastBuildDate>
		
			<atom:link href="https://gradot.dev/blog/tags/c/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Sharing strings between C and Python through byte buffers</title>
				<link>https://gradot.dev/blog/posts/2020/c-python-sharing-strings/</link>
				<pubDate>Wed, 17 Jun 2020 16:40:29 +0200</pubDate>
				<guid>https://gradot.dev/blog/posts/2020/c-python-sharing-strings/</guid>
				<description>&lt;p&gt;If you use a buffer of bytes to share strings between C (or C++) and Python, you may end up with weird results, because both languages do not represent strings the same way.&lt;/p&gt;&#xA;&lt;p&gt;I got bitten lately and here is what I have learnt.&lt;/p&gt;&#xA;&lt;h2 id=&#34;c-strings&#34;&gt;C strings&lt;/h2&gt;&#xA;&lt;p&gt;If you have used C to handle strings once in your lifetime, then you have run into one of the most painful things in C: null-terminated strings 😑&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
