On 12-08-14 04:38 , Dodji Seketeli wrote:
Hello Diego,
Just some minor comments.
Diego Novillo <dnovi...@google.com> a écrit:
[...]
+@section User-provided marking routines for template types
+When a template type @code{TP} is marked with @code{GTY}, all
+instances of that type are considered user-provided types. This means
+that the individual instances of @code{TP} do not need to marked with
s/to marked/to be marked/
Done.
+@code{GTY}. The user needs to provide template functions to mark all
+the fields of the type.
+
+The following code snippets represent all the functions that need to
+be provided. Note that type @code{TP} may reference to more than one
+type. In these snippets, there is only one type @code{T}, but there
+could be more.
+
+@smallexample
+template<typename T>
+void gt_ggc_mx (TP<T> *tp)
+@{
Just for my education, for the marking routines in general why having
the parameter tp be a pointer, rather than TP<T> &tp ?
It would be better, yes. But since gengtype does not generate files
that include the proper headers, we can't. We can get away with forward
declaring the struct names and passing pointers around, but the minute
you add a type reference, all hell breaks loose.
Diego.