mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 10:37:46 +00:00
60a01a43a3
This makes string slicing cheap.
12 lines
238 B
C
12 lines
238 B
C
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct {
|
|
uint32_t len; // TODO: size_t (or, let max string size depend on target/flag)
|
|
uint8_t *buf; // points to string buffer itself
|
|
} string_t;
|
|
|
|
typedef int32_t intgo_t; // may be 64-bit
|