<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Is this: "A_FLOAT" forbidden?</p>
<p>~~~~~ </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
void pddplink_setup(void)</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
{</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
t_symbol *dirsym;</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
pddplink_class = class_new(gensym("pddplink"),</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
(t_newmethod)pddplink_new,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
(t_method)pddplink_free,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
sizeof(t_pddplink),</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
CLASS_NOINLET | CLASS_PATCHABLE,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
A_GIMME, 0);</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
class_addanything(pddplink_class, pddplink_anything);</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
class_setwidget(pddplink_class, &pddplink_widgetbehavior);</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
pddplinkbox_class = class_new(gensym("pddplink"), 0,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
(t_method)pddplink_free,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
sizeof(t_pddplink), 0, A_GIMME, 0);</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
class_addbang(pddplinkbox_class, pddplink_bang);</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
class_addanything(pddplinkbox_class, pddplink_anything);</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
class_addmethod(pddplinkbox_class, (t_method)pddplink_click,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
gensym("click"),</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
dirsym = pddplink_class->c_externdir; /* FIXME */</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
sys_vgui("source {%s/pddplink.tcl}\n", dirsym->s_name);</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">
}</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</p>
<p><style type="text/css">
p, li { white-space: pre-wrap; }
</style></p>
<p></p>
<p>~~~~~ </p>
<pre class="moz-signature" cols="72">Mensaje telepatico asistido por maquinas.</pre>
<div class="moz-cite-prefix">On 12/10/19 7:30 PM, Lucas Cordiviola wrote:<br>
</div>
<blockquote type="cite" cite="mid:DM6PR01MB43163F0021ABDD0ED871AB6DA65B0@DM6PR01MB4316.prod.exchangelabs.com">
I get the segfault on linux (it also crashes Pd-double) <br>
<br>
~~~~~~~~~~~ <br>
<br>
Program received signal SIGSEGV, Segmentation fault. <br>
0x00007ffff6170e93 in pddplink_setup () <br>
   from /home/lucarda/Desktop/luclibdep/00-lucarda-external-dep/out64single/lucdep/liblucdep.so<br>
<br>
~~~~~~~~~~~~~~~ <br>
<br>
<br>
:) <br>
<br>
<br>
Mensaje telepatico asistido por maquinas. <br>
<br>
On 12/10/19 7:06 PM, IOhannes m zmölnig wrote: <br>
<blockquote type="cite">On 12/10/19 10:48 PM, Christof Ressi wrote: <br>
<blockquote type="cite">I'm also interested in how this works. The following solution popped up in my head: compile the object twice, one time with -DPD_FLOATSIZE=32 and another time with -DPD_FLOATSIZE=64, with different setup functions based on -DPD_FLOATSIZE,
 then link it with a third file which exports the "real" setup function (which calls the other two private setup functions).
<br>
<br>
</blockquote>
that's about the idea. <br>
<br>
gdsa r <br>
IOhannes <br>
<br>
<br>
_______________________________________________ <br>
Pd-dev mailing list <br>
<a class="moz-txt-link-abbreviated" href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-dev">https://lists.puredata.info/listinfo/pd-dev</a>
<br>
</blockquote>
</blockquote>
</body>
</html>