Follow the pkg__type__method convention for base.

This commit is contained in:
Nigel Tao committed 2017-10-21 15:59:08 +11:00
1 parent 362bb94e68
commit f29c4e278f
19 files changed
+747 -734

No files matched your search

+2 -2
View File
@@ -168,7 +168,7 @@ func (g *gen) writeFuncImplHeader(b *buffer) error {
}
b.writes("}")
b.printf("if (self->private_impl.magic != PUFFS_MAGIC) {"+
b.printf("if (self->private_impl.magic != PUFFS_BASE__MAGIC) {"+
"self->private_impl.status = %sERROR_INITIALIZER_NOT_CALLED; }", g.PKGPREFIX)
b.writes("if (self->private_impl.status < 0) {")
@@ -226,7 +226,7 @@ func (g *gen) writeFuncImplBodyResume(b *buffer) error {
// https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
//
// The matching } is written below. See "Close the coroutine switch".
b.writes("switch (coro_susp_point) {\nPUFFS_COROUTINE_SUSPENSION_POINT(0);\n\n")
b.writes("switch (coro_susp_point) {\nPUFFS_BASE__COROUTINE_SUSPENSION_POINT(0);\n\n")
}
return nil
}