On Sat, Aug 21, 2021 at 01:32:10PM +0200, Christof Ressi wrote:
> > My understanding has always been: m_pd.h is public and generally
> > shouldn't change without some sort of compatibility coverage. Anything
> > other .h is private.
> That's the theory. On the other hand, many functions/variables in
> "g_all_guis.h", "s_stuff.h" and "m_imp.h" are marked as "EXTERN" (which on
> Windows resolves to a DLL import/export!). If those functions are really
> private, why are they EXTERN?
> 
So that you can write stuff that uses them, if you need to, with the
understanding that your code might have to be revised in the future.

> Another problem is that Pd by default exports all symbols, so people can
> easily use functions that are not explicitely exported or even declared in a
> header (by providing their own forward declaration).
> 
> It would help if we would only explicitly export functions/variables that
> are meant to be used by externals or libpd clients and hide everything else.
> (See 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pure-2Ddata_pure-2Ddata_issues_569&d=DwID-g&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=AfMvxz-BIteg4DPIYZWcmVIXjQh_32F-hBNMAjtJ8II&s=2OsF1UglA-0pKTgbAQsdWgBoNb1qNkvgcsCxCn4yKvk&e=
> ). We can still have different policies for different header files ("m_pd.h"
> is the stable API and everything else is "use at your own risk").
> 
> As a side note: libpd actually depends on the private API because some
> essential functions, like sys_pollgui() resp. sys_microsleep(), are not part
> of "m_pd.h". I guess we should think which functions are necessary for
> libpd, so we can stabilize them and move them to "m_pd.h".
> 
Yep.  I believe libpd ships with a fixed version of Pd (0.51 ATM).  The z_
files are now also distributed as part of Pd so that the libpd "c" bindings
are now part of vanilla (and indeed I had to modify them).  I believe the
libpd maintainers can switch to using Pd's z_ files now so that they don't 
have any more dependencies outside m_pd.h.

cheers
M

> Christof
> 
> On 21.08.2021 12:55, Dan Wilcox wrote:
> > My understanding has always been: m_pd.h is public and generally
> > shouldn't change without some sort of compatibility coverage. Anything
> > other .h is private. I wrote d_soundfile.h and s_net.h as private
> > headers, but they could be included in m_pd.h to make them public for
> > example. We could add commenting marking them as such.
> > 
> > > On Aug 21, 2021, at 5:03 AM, [email protected]
> > > <mailto:[email protected]> wrote:
> > > 
> > > > Well, I've never been able to articulate a clear and complete policy...
> > > > Roughly speaking, I'm maintaining source and binary
> > > > compatibility for anything
> > > > that uses the public API (m_pd.h) and trying not to break things
> > > > that use
> > > > private APIs (g_vanas.h, s_stuff.h and, privater still,
> > > > m_imp.h").  Meanwhile
> > > > there's a profusion of ".h" files I didn't write (d_soundfile.h,
> > > > g_all_guis.h,
> > > > etc) that I've never formed a policy for.
> > 
> > --------
> > Dan Wilcox
> > @danomatika 
> > <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_danomatika&d=DwID-g&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=AfMvxz-BIteg4DPIYZWcmVIXjQh_32F-hBNMAjtJ8II&s=mFePAXFbbZN9gKBgul5gG5gVJt4g0CESxZ0xegqBoOA&e=
> >  >
> > danomatika.com 
> > <https://urldefense.proofpoint.com/v2/url?u=http-3A__danomatika.com&d=DwID-g&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=AfMvxz-BIteg4DPIYZWcmVIXjQh_32F-hBNMAjtJ8II&s=X3fl4SUDhrj4F2rgMf_PovauNhMvWLYj6zNBdXRgdtA&e=
> >  >
> > robotcowboy.com 
> > <https://urldefense.proofpoint.com/v2/url?u=http-3A__robotcowboy.com&d=DwID-g&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=AfMvxz-BIteg4DPIYZWcmVIXjQh_32F-hBNMAjtJ8II&s=PRQbpajFqKxf5WYwCBTl56wshI774fzhijRWImJFL28&e=
> >  >
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Pd-dev mailing list
> > [email protected]
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_listinfo_pd-2Ddev&d=DwID-g&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=AfMvxz-BIteg4DPIYZWcmVIXjQh_32F-hBNMAjtJ8II&s=i3E6fQIv2nVSead4SQPOUz98nnuJAuHtK0EYEk5_uAI&e=

> _______________________________________________
> Pd-dev mailing list
> [email protected]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_listinfo_pd-2Ddev&d=DwICAg&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=AfMvxz-BIteg4DPIYZWcmVIXjQh_32F-hBNMAjtJ8II&s=i3E6fQIv2nVSead4SQPOUz98nnuJAuHtK0EYEk5_uAI&e=
>  


-- 



_______________________________________________
Pd-dev mailing list
[email protected]
https://lists.puredata.info/listinfo/pd-dev

Reply via email to