~ecs/mrsh-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH madeline] Use opaque

Details
Message ID
<20230806221701.11517-1-sebastian@sebsite.pw>
DKIM signature
pass
Download raw message
Patch: +3 -3
Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
 graph/props+gen.ha | 2 +-
 made/actions.ha    | 2 +-
 made/hist.ha       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/graph/props+gen.ha b/graph/props+gen.ha
index 8248d3e..843f881 100644
--- a/graph/props+gen.ha
+++ b/graph/props+gen.ha
@@ -107,7 +107,7 @@ fn handle(
	};
};

fn cmp(a: const *void, b: const *void) int = {
fn cmp(a: const *opaque, b: const *opaque) int = {
	const a = a: const *(u32, prop), b = b: const *(u32, prop);
	return if (a.0 < b.0) -1 else if (a.0 > b.0) 1 else 0;
};
diff --git a/made/actions.ha b/made/actions.ha
index 03a9341..bfbf7d9 100644
--- a/made/actions.ha
+++ b/made/actions.ha
@@ -79,7 +79,7 @@ fn complete(s: *state) void = {
	};
};

fn cmp_completion(a: const *void, b: const *void) int = {
fn cmp_completion(a: const *opaque, b: const *opaque) int = {
	const a = a: *const (str, str), b = b: *const (str, str);
	return strings::compare(a.0, b.0);
};
diff --git a/made/hist.ha b/made/hist.ha
index 1b06754..c4370c3 100644
--- a/made/hist.ha
+++ b/made/hist.ha
@@ -85,7 +85,7 @@ fn histhandle_mmap(file: io::file) (history | error) = {

	const data = io::mmap(null, off: size, io::prot::READ,
		io::mflag::PRIVATE, file, 0)?: *[*]u8;
	defer io::munmap(data: *void, off: size)!;
	defer io::munmap(data, off: size)!;
	const data = data[..off];
	const data = strings::fromutf8(data)?;

-- 
2.40.1
Details
Message ID
<CUY9X3IO0YVH.OAMVTQNQ5QKQ@monch>
In-Reply-To
<20230806221701.11517-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
thanks!

to git@git.d2evs.net:~ecs/madeline
  17a6c61..0d00d20  madeline -> madeline
Reply to thread Export thread (mbox)