<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>potisan</author_name>
  <author_url>https://blog.hatena.ne.jp/potisan/</author_url>
  <blog_title>potisanのプログラミングメモ</blog_title>
  <blog_url>https://potisan-programming-memo.hatenablog.jp/</blog_url>
  <categories>
    <anon>Python 3</anon>
  </categories>
  <description>ctypes 1.1.0のStructure系クラスで__slot__を指定（消費メモリの節約）するとき、_fields_の中身は考慮しなくて大丈夫そうです。とりあえずつけておくとメモリ節約できるかもしれません。 from ctypes import Structure, c_int32 class Dummy1(Structure): _fields_ = ((&quot;x&quot;, c_int32),) class Dummy2(Structure): _fields_ = ((&quot;x&quot;, c_int32),) __slots__ = () dummy1 = Dummy1() dummy2 = Dummy…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2025%2F04%2F08%2F211054&quot; title=&quot;Python ctypes 1.1.0 Structure系クラスの__slot__指定は_fields_の中身は考慮しなくて大丈夫そう - potisanのプログラミングメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-04-08 21:10:54</published>
  <title>Python ctypes 1.1.0 Structure系クラスの__slot__指定は_fields_の中身は考慮しなくて大丈夫そう</title>
  <type>rich</type>
  <url>https://potisan-programming-memo.hatenablog.jp/entry/2025/04/08/211054</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
