[flext] More on naming...
Thomas Grill
gr at grrrr.org
Thu Apr 10 16:08:51 UTC 2014
Hi Jamie, many thanks for the recipe. Let's see if this can be integrated into the trunk in a more compact way.
Just to make sure: Are you certain that the tilde setup function for DSP objects doesn't need to be specified?
gr~~~
--
Thomas Grill
http://grrrr.org
Am 10.04.2014 um 18:04 schrieb Jamie Bullock <jamie at jamiebullock.com>:
>
> Hi Thomas,
>
> Thanks...
>
> Actually, it seems sufficient to add to flbase.h:
>
> #if defined(FLEXT_USE_HEX_SETUP_NAME) && defined(FLEXT_SYS_PD)
> #define FLEXT_STPF_0(NAME) setup_##NAME
> #define FLEXT_STPF_1(NAME) setup_##NAME
> #elif FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX
> #define FLEXT_STPF_0(NAME) NAME##_setup
> #define FLEXT_STPF_1(NAME) NAME##_tilde_setup
> #else
> #error Platform not supported
> #endif
>
> And then to do something like:
>
> typedef class ml_svm ml0x2dsvm;
> FLEXT_NEW("ml-svm", ml0x2dsvm);
>
> I guess you might consider this a bit ugly, but it works for my purposes.
>
> Jamie
>
>
>
> On 10 Apr 2014, at 11:55, Thomas Grill <gr at grrrr.org> wrote:
>
>> Hi Jamie,
>> it’s exactly the same as with the dot. To my knowledge, only a-z0-9_ are considered as normal characters for Pd externals.
>> It would be possible to extend flext - it would require a new set of #defines for the class setup. It’s kind of awkward, that’s why i have refrained from it so far in the flext main trunk. But one can certainly fork the flext source and extend it in that fashion.
>> gr~~~
>>
>> Am 10.04.2014 um 12:50 schrieb Jamie Bullock <jamie at jamiebullock.com>:
>>
>>>
>>> Hi,
>>>
>>> We've decided to change our naming convention from ml.* to ml-* so we can build our library as either a Max/Pd "library" or individual objects.
>>>
>>> This presents a new problem:
>>>
>>> - everything works under Max
>>> - under Pd, we can use ml-* if we compile as a library
>>> - if we compile as individual objects then Pd throws an error of the form "load_object: Symbol "setup_ml0x2dsvm" not found"
>>>
>>> I did some investigation and if I create a normal Pd external (not using Flext), I can rename the setup function to "setup_ml0x2dsvm" and it does indeed work.
>>>
>>> So my question is: is there any way to achieve this trick with Flext?
>>>
>>> Jamie
>>>
>>>
>>> _______________________________________________
>>> http://grrrr.org/ext/flext
>>>
>>> flext mailing list
>>> flext at grrrr.org
>>> http://grrrr.org/cgi-bin/mailman/listinfo/flext
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20140410/f05e4cf4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://grrrr.org/pipermail/flext/attachments/20140410/f05e4cf4/attachment.sig>
More information about the flext
mailing list