A patch is attached (0001-..) which adds an entry to Section 2.2. Also attached (0002-...) are some changes I had to make (escaping some underscores) to test building the manual with pdflatex on my laptop. I didn't run the full doc building process so I'm not sure if these are necessary changes on the system where the docs are actually generated.
On Fri, May 20, 2016 at 9:35 PM, Barry Smith <[email protected]> wrote: > >> On May 20, 2016, at 3:50 AM, Patrick Sanan <[email protected]> wrote: >> >> A short blurb in the dev manual re PETSC_EXTERN and PETSC_INTERN might >> be helpful for contributors. There have been some changes recently and >> some of the older advice on petsc-dev is stale (there is discussion of >> deprecated things like PETSC_INTERN_C, notes from when PETSc compiled >> into several separate shared libraries, etc.). >> >> My current understanding is something like the folllowing. >> >> PETSC_EXTERN : for symbols which should be visible to other shared >> libraries, *including plugins* . >> >> PETSC_INTERN : for symbols which need to be visible across >> compilation units, but only within the PETSc shared library. > > actually only within a SINGLE PETSc shared library. Sometimes people forget > that the PETSc libraries can be built as sys, vec, mat, dm, ksp, snes, ts so > anything that is private but still needed in more than one of the libraries > needs a PETSC_EXTERN. If someone makes a mistake it is only detected with the > multiple library builds. > >> >> In both cases, the names are demangled if C++ is involved. >> >> If that's right, I can make a patch to add it to the manual (at the >> end of Section 2.2, say). > > Thanks. Go ahead. We "improved" this stuff in PETSc a good deal but did > not properly update the developers guide. > > Barry > >
0001-Dev-Manual-add-blurb-on-PETSC_INTERN-and-PETSC_EXTER.patch
Description: Binary data
0002-dev-manual-add-some-escaped-underscores-to-be-able-t.patch
Description: Binary data
