[flext] More on naming...

Jamie Bullock jamie at jamiebullock.com
Thu Apr 10 16:04:20 UTC 2014


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/64c57851/attachment.html>


More information about the flext mailing list