[webkit-dev] Build issues due to anonymous namespace

Caio Lima ticaiolima at gmail.com
Sun Dec 3 08:54:35 PST 2017


Ok.

It's a common pattern to use "struct DestroyFunc {".

I'm going to rename all of them.

Em dom, 3 de dez de 2017 às 14:52, Filip Pizlo <fpizlo at apple.com> escreveu:

> Maybe just give that DestroyFunc a more unique name like
> JSSegmentedVariableObjectDestroyFunc. Cc me on such a patch and I’ll
> happily review it.
>
> -Filip
>
> > On Dec 3, 2017, at 8:44 AM, Caio Lima <ticaiolima at gmail.com> wrote:
> >
> > Hi guys. I'm working in a Patch that is adding some files to JSC and I
> faced following issue:
> >
> > ./runtime/JSStringHeapCellType.cpp:36:8: error: redefinition of
> 'DestroyFunc'
> > ...
> > In file included from /Users/caiolima/open_projects/
> WebKit/WebKitBuild/Debug/DerivedSources/JavaScriptCore/unified-sources/
> UnifiedSource109.cpp:1:
> > ./runtime/JSSegmentedVariableObjectHeapCellType.cpp:36:8: note:
> previous definition is here
> >
> > That is my UnifiedSource109.cpp content:
> >
> > #include "runtime/JSSegmentedVariableObjectHeapCellType.cpp"
> > #include "runtime/JSSet.cpp"
> > #include "runtime/JSSetIterator.cpp"
> > #include "runtime/JSSourceCode.cpp"
> > #include "runtime/JSString.cpp"
> > #include "runtime/JSStringHeapCellType.cpp"
> > #include "runtime/JSStringIterator.cpp"
> > #include "runtime/JSStringJoiner.cpp"
> >
> > So, I tried to use "namespace FILENAME" magic, but it doesn't seem
> working, mainly because there is no other file using it.
> >
> > What are the actions do I need to take in such case to fix it properly?
> >
> > Regards,
> > Caio.
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > https://lists.webkit.org/mailman/listinfo/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20171203/5324dddd/attachment.html>


More information about the webkit-dev mailing list