*/
/* }}} */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include "minimal/stdlib.h"
-
#include <apr_strings.h>
-
-#include <string.h>
-
#include "sig/parse.hpp"
+#include "Error.hpp"
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
namespace sig {
// XXX: this types thing is a throwback to JocStrap
- char *types;
- if (next != '=') {
- types = NULL;
- } else {
- const char *temp(*name);
+ if (next == '=')
Parse_(pool, &type->data.signature, name, end, callback);
- types = (char *) apr_pstrmemdup(pool, temp, *name - temp - 1);
- }
-
- if (callback != NULL)
- (*callback)(pool, type->name, types, type);
} break;
case 'N': type->flags |= JOC_TYPE_INOUT; goto next;
_assert(false);
}
+ if (callback != NULL)
+ (*callback)(pool, type);
+
return type;
}
case array_P: {
const char *value = Unparse(pool, type->data.data.type);
- return apr_psprintf(pool, "[%lu%s]", type->data.data.size, value);
+ return apr_psprintf(pool, "[%zu%s]", type->data.data.size, value);
} break;
case pointer_P: return apr_psprintf(pool, "^%s", type->data.data.type == NULL ? "v" : Unparse(pool, type->data.data.type));