Commit 3b0e4f1e authored by Kenton Varda's avatar Kenton Varda

Update capnpc-capnp to use KJ_MAIN.

......@@ -41,6 +41,12 @@
#include <capnp/serialize-packed.h>
#include <limits>
#if HAVE_CONFIG_H
#include "config.h"
#else
#define VERSION "(unknown ekam build)"
#endif
namespace capnp {
namespace compiler {
......@@ -65,7 +71,7 @@ public:
}
};
static const char VERSION_STRING[] = "Cap'n Proto version 0.2";
static const char VERSION_STRING[] = "Cap'n Proto version " VERSION;
class CompilerMain final: public GlobalErrorReporter {
public:
......
This diff is collapsed.
......@@ -350,6 +350,11 @@ public:
template <typename Iterator>
void addAll(Iterator start, Iterator end);
void removeLast() {
KJ_IREQUIRE(pos > ptr, "No elements present to remove.");
kj::dtor(*--pos);
}
Array<T> finish() {
// We could safely remove this check if we assume that the disposer implementation doesn't
// need to know the original capacity, as is thes case with HeapArrayDisposer since it uses
......
......@@ -87,6 +87,10 @@ public:
addAll(container.begin(), container.end());
}
inline void removeLast() {
builder.removeLast();
}
private:
ArrayBuilder<T> builder;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment