<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
</head>
<body><div>I imagine Cython already takes care of this?</div>
<div><br></div>
<div><br></div>
<div>On Tue, Dec 26, 2017, at 02:16, Hugh Fisher wrote:<br></div>
<div>> I have a Python program which generates the boilerplate code for<br></div>
<div>> native extension modules from a Python source definition.<br></div>
<div>> (http://bitbucket.org/hugh_fisher/fullofeels if interested.)<br></div>
<div>><br></div>
<div>> The examples in the Python doco and the "Python Essential Reference"<br></div>
<div>> book all use a statically declared PyTypeObject struct and<br></div>
<div>> PyType_Ready in the module init func, so I'm doing the same. Then<br></div>
<div>> Python 3.5 added a check for statically allocated types inheriting<br></div>
<div>> from heap types, which broke a couple of my classes. And now I'm<br></div>
<div>> trying to add a __dict__ to native classes so end users can add their<br></div>
<div>> own attributes, and this is turning out to be painful with static<br></div>
<div>> PyTypeObject structs<br></div>
<div>><br></div>
<div>> Would it be better to use dynamically allocated type structs in native modules?<br></div>
<div>><br></div>
<div>> --<br></div>
<div>><br></div>
<div>> cheers,<br></div>
<div>> Hugh Fisher<br></div>
<div>> _______________________________________________<br></div>
<div>> Python-Dev mailing list<br></div>
<div>> Python-Dev@python.org<br></div>
<div>> https://mail.python.org/mailman/listinfo/python-dev<br></div>
<div>> Unsubscribe:<br></div>
<div>> https://mail.python.org/mailman/options/python-dev/benjamin%40python.org<br></div>
<div><br></div>
</body>
</html>