[PD-dev] Double precision externals extensions.

Lucas Cordiviola lucarda27 at hotmail.com
Tue Dec 10 23:37:52 CET 2019


Is this: "A_FLOAT" forbidden?

~~~~~

void pddplink_setup(void)

{

t_symbol *dirsym;

pddplink_class = class_new(gensym("pddplink"),

(t_newmethod)pddplink_new,

(t_method)pddplink_free,

sizeof(t_pddplink),

CLASS_NOINLET | CLASS_PATCHABLE,

A_GIMME, 0);

class_addanything(pddplink_class, pddplink_anything);

class_setwidget(pddplink_class, &pddplink_widgetbehavior);

pddplinkbox_class = class_new(gensym("pddplink"), 0,

(t_method)pddplink_free,

sizeof(t_pddplink), 0, A_GIMME, 0);

class_addbang(pddplinkbox_class, pddplink_bang);

class_addanything(pddplinkbox_class, pddplink_anything);

class_addmethod(pddplinkbox_class, (t_method)pddplink_click,

gensym("click"),

A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);

dirsym = pddplink_class->c_externdir; /* FIXME */

sys_vgui("source {%s/pddplink.tcl}\n", dirsym->s_name);

}

~~~~~

Mensaje telepatico asistido por maquinas.

On 12/10/19 7:30 PM, Lucas Cordiviola wrote:
I get the segfault on linux (it also crashes Pd-double)

~~~~~~~~~~~

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6170e93 in pddplink_setup ()
   from /home/lucarda/Desktop/luclibdep/00-lucarda-external-dep/out64single/lucdep/liblucdep.so

~~~~~~~~~~~~~~~


:)


Mensaje telepatico asistido por maquinas.

On 12/10/19 7:06 PM, IOhannes m zmölnig wrote:
On 12/10/19 10:48 PM, Christof Ressi wrote:
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).

that's about the idea.

gdsa r
IOhannes


_______________________________________________
Pd-dev mailing list
Pd-dev at lists.iem.at<mailto:Pd-dev at lists.iem.at>
https://lists.puredata.info/listinfo/pd-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20191210/ccefb408/attachment.html>


More information about the Pd-dev mailing list